Here is what i tried.Can you please help me to resolve the below issue.Actually i would like to build a string and send it to curl_setopt function.Here is the below code which i tired. Even i tried with appending single quotes but it did not work.But if i substitute $urlstring with exact URL it works.Please help me in this regard Thanks and Regards Sree Aurovindh.V SCWCD $urlstring="http://www.example.com/sendsms.php?uid=948AVC433&pwd=abccc&phone="; $urlstring=$urlstring.$phone; $parameter="&msg="; $urlstring=$urlstring.$mailmessage; ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$urlstring); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $contents = curl_exec ($ch); curl_close ($ch); echo $contents; PHP:
Check this code: $urlstring="http://www.example.com/sendsms.php?uid=948AVC433&pwd=abccc&phone=".$phone."&msg=".$mailmessage; ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$urlstring); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $contents = curl_exec ($ch); curl_close ($ch); echo $contents; PHP: