php - Curl Installation -


i post question , 1 informed me user curl function. dig in detail , got confuse. have install curl , can use curl function pass value ?

post_to_url("https://www.msgapp.com/restpostform.aspx", $data);  $data= array(                 "customer"=> "ch",                 "cke"=>"1",                 "ownerid"=> "6",                 "overwrite"=>"0",                 "triggerid"=> "1950",                 "pushexternal"=> "1",                 "city"=> "london",                 "firstname"=>"test",                 "lastname"=>"user",                 "email"=> "jibran@abc.com"                     );       function post_to_url($url, $data) {    $fields = '';    foreach($data $key => $value) {        $fields .= $key . '=' . $value . '&';     }    rtrim($fields, '&');     $post = curl_init();     curl_setopt($post, curlopt_url, $url);    curl_setopt($post, curlopt_post, count($data));    curl_setopt($post, curlopt_postfields, $fields);    curl_setopt($post, curlopt_returntransfer, 1);     $result = curl_exec($post);     curl_close($post); } 

search php.ini file

‘;extension=php_curl.dll’

and remove semi-colon in front, can run curl function


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -