[PHP] http message

2001-12-17 Thread LaserJetter
Is there a way for PHP to attempt to open a URL and return the HTTP response header? For example, I want to make a PHP page which will redirect a visitor to a mirror site if it encounters a 404 Not found error whilst trying to open the website homepage. This test page will reside on a seperate ser

[PHP] HTTP message

2001-04-25 Thread Young Chi-Yeung Fan
Is it possible from PHP to look at the HTTP message sent to a script? If so, how can I do it? e.g.: POST /MessageReceiver.jsp HTTP/1.0 Host: www.SomeHost.net Content-Type: application/x-www-form-urlencoded Content-Length: 105 XML=%3C?xml%20version%3D%221.0%22%20encoding%3D%22utf-8%22?%3E%0A%3Cd