So I've been monkeying with HTTP headers in PHP.
This is something I figured i would have to learn sooner or later. Right now I just want to read headers returned when calling remote files. So far no luck. But I've done a ton of interesting reading on the subject.
PHP rocks. There is really so much that is built in. Virtually every programming task that I would like to do CAN BE DONE - without having to shell out for some third party application. (*cough ASP sucks).
WHOOHOOO - while I was typing this a lightbulb went off in my head so I decided to try something out... DUH - it was something so silly. I can indeed read the headers.
<?PHP
@$file = fopen('http://www.andremolnar.com/some-file-that-doesn't-exist',"r");
print_r($http_response_header);
?>
I was having a combination of PHP version issues and typo issues.
So - back to what I was saying - anything I would like to do in PHP I can do. Now that I can read returned headers I can decide what action I want to take depending on the status of the requested file. Hella cool.
andre
Posted by andre at February 26, 2004 04:57 AM