I want to create a callback feature. E.g. The client does something but then we need to open up a page with a few GET variables to one of our partners. Therefore id like to make a PHP script which opens a website with all the data in the URL (The user shouldnt see this, it should be done server sided). How could I do this thanks. A bit like some IPN systems. Sorry that the question is not very well constructed if you need more detail ill provide more.
Share
I like
fopenokay, thoughfsockopenis more appropriate for a remote URL, but I find CURL to be much more powerful. You’ll need to have compiled PHP with support for CURL, but it’s a default package on many systems. You can check if your current system supports it by pulling up aphpinfo()page and looking for CURL.The benefit of using CURL is you get really fine grained control over the request and how to handle the response. The php docs have a fairly concise example of how to use CURL; due to the number of options available it can get verbose quickly. The functions you’ll use most are
curl_init,curl_setoptandcurl_exec