1function getUrl($url){
2 $ch = curl_init($url);
3 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
4 $response = curl_exec($ch);
5 curl_close($ch);
6 return $response;
7}
1$ch = curl_init();
2curl_setopt($ch,CURLOPT_URL, $url);
3curl_setopt($ch,CURLOPT_POST, count($fields));
4curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
5$result = curl_exec($ch);
6curl_close($ch);
7//check the result
8var_dump($result);