CURL GET Request

Example of using CURL to get a page that outputs json $url = "mydomain.org/somefile.php?MyParameter1=abc&MyParameter2=2"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //Follow any page redirects etc (optional) curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //<<<Include this for the output of curl to go to the curl_exec() output below instead of the browser screen curl_setopt($cURL, CURLOPT_HTTPGET, true); //You don't […]

Read More