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
MAIL=admin@xyz.com
Thanks.
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.php Either one of these should get you what you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.