Your POST request contains an invalid URI as the error reported. It should be in the following format:
POST http://whateverthisshouldbe/displayquery.php HTTP/1.0
So don’t forget the full URL and URI.
I’m not sure why you have a slash right after the POST, nor do I know what you’re trying to accomplish with cgi-bin
Thanks for the quick reply. This is the Paypal sandbox test URI, I am not sure what the full URI should be as I posted in Paypal, got no answer. This URI is from Paypal’s website.
Rolling your own fsockopen() based HTTP library when you haven’t read the HTTP specifications is not a good idea. The fact “it works” is meaningless. You got lucky that the server understands broken input. Using a full URL in the request line is for proxy servers to know where to forward the request to. I’ve written a fully functional HTTP(S) library that is included with WebCron Site Backup that you can leverage instead of fiddling around with broken code. Sure your code “works” now but what happens if PayPal decides to update their Apache install to something more recent? You are depending on broken functionality, it could go away at any time and your code won’t work.