I want to save some data in mysql on my server by curl, my code is something like this
my curl
function verify_data_on_server
($user_id,$user_name,$user_code,$user_type,$user_url,$ user_email)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://myurl.com/apis/verified_user.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query(array('user_id' => $user_id,'user_name' => $user_name,'user_code' => $user_code,'user_type' => $user_type,'user_url' => $user_url,'user_email' => $user_email)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close ($ch);
if ($server_output == "status") { echo "done"; } else { echo "fail!";}
} ?>
but data not save . please guide me where im wrong ?
I want to save some data in mysql on my server by curl, I tried a lot but didn't get any success