Site temporarily unavailable.

Site temporarily unavailable. SearchSearch
Author Message
Benj Ngo
New member
Username: Bngo

Post Number: 1
Registered: 12-2019
Posted on Friday, December 20, 2019 - 08:30 am:   

I am trying to send message through php script using cloud edition. Sometime it sends message quickly and sometime it gives error like Site temporarily unavailable. Connection timed out - please try again.

What can be a possible issue?

Thanks
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 6080
Registered: 08-2008
Posted on Monday, December 23, 2019 - 07:34 pm:   

Hi,

Can you put some debug in your code to determine how much time elapses before the connection timeout is reported? I think we should determine if there is an actual timeout or some other error is occurring.

I've enabled extra debug on your server. So if you experience the problem again, please advise a time window during which the problem is experienced.

--
Des
NowSMS Support
Benj Ngo
New member
Username: Bngo

Post Number: 2
Registered: 12-2019
Posted on Tuesday, December 24, 2019 - 06:31 am:   

Hi,

when we try to send a message with connecting modem again then sends first message very quickly and after that for next message it gives connection timeout error. Sometime it sends messages and sometime it does not. So i think its not issue regarding code.

Approx. after 30 seconds it gives connection timeout error.

following php function I am using to send sms.

function SendSMS ($hostUrl, $username, $password, $phoneNoRecip, $msgText,

$n1 = NULL, $v1 = NULL, $n2 = NULL, $v2 = NULL, $n3 = NULL, $v3 = NULL,

$n4 = NULL, $v4 = NULL, $n5 = NULL, $v5 = NULL, $n6 = NULL, $v6 = NULL,

$n7 = NULL, $v7 = NULL, $n8 = NULL, $v8 = NULL, $n9 = NULL, $v9 = NULL ) {



$postfields = array('Phone'=>"$phoneNoRecip", 'Text'=>"$msgText");

if (($n1 != NULL) && ($v1 != NULL)) $postfields[$n1] = $v1;

if (($n2 != NULL) && ($v2 != NULL)) $postfields[$n2] = $v2;

if (($n3 != NULL) && ($v3 != NULL)) $postfields[$n3] = $v3;

if (($n4 != NULL) && ($v4 != NULL)) $postfields[$n4] = $v4;

if (($n5 != NULL) && ($v5 != NULL)) $postfields[$n5] = $v5;

if (($n6 != NULL) && ($v6 != NULL)) $postfields[$n6] = $v6;

if (($n7 != NULL) && ($v7 != NULL)) $postfields[$n7] = $v7;

if (($n8 != NULL) && ($v8 != NULL)) $postfields[$n8] = $v8;

if (($n9 != NULL) && ($v9 != NULL)) $postfields[$n9] = $v9;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $hostUrl);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

// TODO: This script does not currently validate SSL Certificates

// curl_setopt($ch, CURLOPT_VERBOSE, true);

// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);

// curl_setopt($ch, CURLOPT_CAINFO, 'cacert.pem');

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // change to 1 to verify cert

curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

$result = curl_exec($ch);
return $result;
}

Thanks.
Benj Ngo
New member
Username: Bngo

Post Number: 3
Registered: 12-2019
Posted on Monday, January 06, 2020 - 09:52 am:   

Can somebody help? Sending via smshosts.com is working perfectly fine. But when we use our php scripts it keeps giving us timeouts.
Benj Ngo
New member
Username: Bngo

Post Number: 4
Registered: 12-2019
Posted on Monday, January 06, 2020 - 09:59 am:   

It is approximately 9:58AM GMT Time. I have been trying to send SMS the past 5 minutes but it keeps giving me:

Site temporarily unavailable.
Connection timed out - please try again.

Kindly check error logs to see what could be the problem
Benj Ngo
New member
Username: Bngo

Post Number: 5
Registered: 12-2019
Posted on Tuesday, January 07, 2020 - 01:36 pm:   

Issue solved. We have resorted to using javascript instead of curl to send messages.

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: