<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Here's an interesting one for you.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Can I call an&nbsp;HTTP&nbsp;page from WITHIN a PHP 
or PERL script?</FONT></FONT><FONT face=Arial size=2></FONT></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have a legacy server whose only presented 
interface is itself a web server. </FONT><FONT face=Arial size=2>The web server 
in question is kind of messy, and intended for querying by a particular embedded 
hardware client rather than by a human driving a browser. Nonetheless, point a 
browser at it gives a structured response.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm trying to write a human-friendly interface so 
that the content can be viewed with a web browser in a human-readable format. 
For various reasons, it makes sense to write this as something that is, itself, 
a server-side script, rather than a client-side application.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hence, can I call an&nbsp;HTTP&nbsp;page from 
WITHIN a PHP or PERL script (I'm not fussed which.)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>If I can, then I can use either of those languages 
to parse the content and generate a much prettier web page (including generating 
links to drill down further, which is the purpose behind all this.)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I realise that I _could_ shell out to the operating 
system, run something like Lynx, and then take its STDOUT into STDIN, but this 
would immediately force a particular piece of client software onto the 
middleware server, which I don't want for O/S portability reasons.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any ideas?</FONT></DIV>
<DIV><FONT face=Arial size=2><BR>Mark</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>