Here are two PHP scripts I just wrote that use
curl_setopt. The first example makes a GET request, and the second example makes a POST request, and passes JSON data to the web service it accesses.
A PHP curl GET request
This first one makes an HTTP GET request and prints the data that is returned by the URL that it hits:
There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.