Re: load a URL and trap output

From: Date: Fri, 12 Mar 2004 15:53:28 +0000
Subject: Re: load a URL and trap output
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180265@lists.php.net to get a copy of this message
simple use fopen() or file() as $fp = fopen("http://somedomain/some.url?blablah","r"); and read via fread() /tom On Fri, 12 Mar 2004 10:54:53 -0500 Roger Spears <roger@bgnet.bgsu.edu> wrote: > Hello, > > I have this application which is accessed via a web portal. The first > thing my application must do is make sure the visitor is logged in via > the portal. The only way to do this is by making a request to a > specific URL. This URL (which includes the log in cookie id) will > return XML to my application. Once I parse this XML, I will know if > visitors are logged in. > > Simple enough. > > How do I make my application load a URL and trap the returned data so > that it never creates any browser output? > > My first reaction was header("Location: URL") but then I'd be handing > off control to the URL and the output would appear in the browser..... > > I've done some research and found system(), exec(), and passthru(). But > I'm not sure if these functions are the proper way to do such a task > especially since I'm calling a URL and not a specific UNIX command..... > > Thanks, > Roger > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php --

« previous php.general (#180265) next »