jerry4all
08-25-2011, 06:58 AM
Got my sms script working, thanks the people here.. but for this little problem.
it prints the contents of $response without adding the print command and the ifelse function constantly returns the response of the first condition. Any help will be very useful
Here's the cUrl section of the script
$url = "http://www.bbnsms.com/bulksms/bulksms.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url.$request);
if ( "1801" == curl_exec($ch))
echo "Message sent successfully";
elseif (curl_exec($ch) == "1802")
echo "Invalid username";
elseif (curl_exec($ch) == "1803")
echo "Invalid password";
curl_close($ch);
it prints the contents of $response without adding the print command and the ifelse function constantly returns the response of the first condition. Any help will be very useful
Here's the cUrl section of the script
$url = "http://www.bbnsms.com/bulksms/bulksms.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url.$request);
if ( "1801" == curl_exec($ch))
echo "Message sent successfully";
elseif (curl_exec($ch) == "1802")
echo "Invalid username";
elseif (curl_exec($ch) == "1803")
echo "Invalid password";
curl_close($ch);