|
-
Nov 10th, 2002, 07:12 PM
#1
Thread Starter
Addicted Member
Getting at headers when requesting a URL
I want to fetch a URL in PHP with fopen or popen or something.
Getting the main content of the page is fine, but I want to access the headers that the server sends back with the page. I'm sure it can be done with popen (or some command to open a tcp/ip connection to port 80?)
-
Nov 11th, 2002, 11:43 PM
#2
Frenzied Member
what headers do you plan on getting?
when you fetch a url with fopen you get the page as you would see it on the website. I don't believe you get any headers as you didn't output it to anything. also popen I also believe will not open url's
-
Nov 12th, 2002, 04:39 AM
#3
Thread Starter
Addicted Member
It's ok, I've figured out how to do it. Forgot to close this thread.
I was after the "Location" header.
I had it in my head that popen was short for "port open". The function I was actually after was fsockopen to open a raw socket to the server and manually send and receive the necessary headers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|