Reputation: 383
I have tried all the suggestions i have seen on how to do this but none seem to be working. Please how do i call an external CGI script (on another website) from a PHP script and collect the output of the script.
The URL given to me is something like this:
https://abc.com/cgi-bin/mbsn.cgi?
PRODUCT_ID=35277&ORDER_ID=12345&QUANTITY=1&FIRSTNAME=Sam&LASTNAME=K&E
[email protected]
Thanks.
Upvotes: 1
Views: 4832
Reputation: 12535
What you want to do is get the results of a web page. It doesn't really matter that it's cgi.
PHP has several methods for doing this.
file_get_contents()
http://php.net/manual/en/function.file-get-contents.php curl()
http://www.php.net/manual/en/curl.examples-basic.phpEither one of these should get you what you want.
Upvotes: 4