Use curl for GET Method

You can securely send you from data to remote server using curl GET method.

$url =' bhattarai&address=samakhusi-kathmandu';
$useragent= "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" ;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url); //set the url we want to use
curl_setopt($ch, CURLOPT_POST, FALSE);
curl_setopt($ch, CURLOPT_POSTFIELDS, null);
curl_setopt($ch, CURLOPT_HTTPGET, TRUE);
curl_close ($ch);

The result from remote site is stored in result variable($result).


Popular posts from this blog

Microsoft and Facebook Announce .NET Client Library

Chrome OS Going to release by next week