Use curl for GET Method
You can securely send you from data to remote server using curl GET method.
$url ='http://yoursite.com?name=krishna- 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).
$url ='http://yoursite.com?name=krishna- 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).
Comments
Post a Comment