Fsockopen error

Fsockopen error SearchSearch
Author Message
Jose Rodrigues
New member
Username: Joserf

Post Number: 1
Registered: 04-2015
Posted on Thursday, April 02, 2015 - 01:59 am:   

$fp = fsockopen($host, $port, $errno, $errstr);
if (!$fp) {
echo "errno: $errno \n";
echo "errstr: $errstr\n";
return $result;
}


did some testing here with sending only returns the error if the server ip is wrong
or the door, if you maintain the correct ip and put a wrong username or password
not retonarna the error, how to solve this? how do I return the error login or password invalid, like when I put the wrong ip or port returning me errno: 110 errstr: Connection timed Out.

tks
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5248
Registered: 08-2008
Posted on Thursday, April 02, 2015 - 01:16 pm:   

Hi,

The following thread has some code that parses the response:

http://support.nowsms.com/discus/messages/1/24868.html

Add the TruncateString function to your PHP, then there is code to parse $x after $x = SendSMS

If $msgidString is set, then the message was submitted.

--
Des
NowSMS Support