Re: URL Problem

From: Date: Wed, 21 Apr 2004 18:40:58 +0000
Subject: Re: URL Problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-34019@lists.php.net to get a copy of this message
Lambert, Patrick wrote:
So it sounds like you need to examine the headers of the response (which sounds like it is a redirect)? Try PEAR's HTTP_Request (http://pear.php.net/package/HTTP_Request).
More specifically, you need a HEAD request: http://pear.php.net/manual/en/package.http.http.head.php For a Redirect, you should get something like this HEAD request (Perl, lwp-request): $ HEAD -S http://www.utc.edu/~recreg/ HEAD http://www.utc.edu/~recreg/ --> 302 Found HEAD http://www.utc.edu/Administration/Records-Registration/ --> 200 OK Connection: close Date: Wed, 21 Apr 2004 18:37:36 GMT Accept-Ranges: bytes ETag: "8b7fe3-444f-40869730" Server: Apache/1.3.20a (NETWARE) mod_jk/1.1.0 Content-Language: en Content-Type: text/html; charset=ISO-8859-1 Last-Modified: Wed, 21 Apr 2004 15:45:52 GMT Client-Date: Wed, 21 Apr 2004 18:38:13 GMT Client-Peer: 192.168.128.10:80 Client-Response-Num: 1 You will have to extract the Redirect part... -Dan -- C. Daniel Chase Dan-Chase@UTC.edu Web Development Specialist (423) 425-4009 The University of Tennessee at Chattanooga http://www.utc.edu/

« previous php.db (#34019) next »