$value){ $getfields .= '&' . $key . '=' . urlencode($value); } if($getfields != ''){ if(strstr($url, '?')){ $url .= $getfields; }else{ $url .= '?' . $getfields; } } curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPGET, 1); $response = curl_exec($ch); return true; }catch(Exception $e){ return false; } curl_close($ch); } } ?>