Re: URL Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx
Web Development Specialist                        (423) 425-4009
The University of Tennessee at Chattanooga   http://www.utc.edu/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux