Site not understanding request sent by fputs?
Posted: Tue Dec 30, 2008 3:51 pm
Hi, I'm trying to write a script that will search for specific information from a php script that is serves xml from a website, and everything is working well except for one thing.
The website uses /options to look at previous pages. I'm not sure how to describe this, so I'll give an example: script.php?xml=true&/302 - would be opening page 302. However, when I type this into my script (using fputs($fc, "GET http://x.com/script.php?xml=true&/302 HTTP/1.1\r\nHost: x.com\r\n\r\n")), I get served the default page, as if the server isn't understanding the request.
If anyone could offer any ideas as to why that would be I'd be very grateful, as I'm relatively new to php, and don't see why this shouldn't be working.
Thanks, Dave
The website uses /options to look at previous pages. I'm not sure how to describe this, so I'll give an example: script.php?xml=true&/302 - would be opening page 302. However, when I type this into my script (using fputs($fc, "GET http://x.com/script.php?xml=true&/302 HTTP/1.1\r\nHost: x.com\r\n\r\n")), I get served the default page, as if the server isn't understanding the request.
If anyone could offer any ideas as to why that would be I'd be very grateful, as I'm relatively new to php, and don't see why this shouldn't be working.
Thanks, Dave

