Re: Cookies with fopen

From: Date: Wed, 10 Dec 2003 18:26:08 +0000
Subject: Re: Cookies with fopen
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31970@lists.php.net to get a copy of this message
Peter Westergaard wrote:
Hi all, Attempting to use PHP to navigate a foreign website, to collect data. This is thus only tangentially related to databases, so I apologize if some feel it's too off-topic. Is there any way to do something similar to fopen() except to also have PHP present a cookie to the foreign webserver as credentials during the HTTP GET? Anyone done something similar? -P Peter Westergaard ICQ#: 10294457 peter@westergaard.ca http://www.westergaard.ca http://courtly.livejournal.com -------TECHNOLOGY------- Human history becomes more and more a race between education and catastrophe. - H.G. Wells
There are multiple projects which will do this for you, simulating an HTTP Client. The one I suggest is PEAR::HTTP_Client. You can use it to send authentication information or to login to a page and it will keep track of cookies for you. http://pear.php.net/package/HTTP_Client If all you need is to do one request, it may be easier to use HTTP_Request instead. -- paperCrane <Justin Patrin>

« previous php.db (#31970) next »