Fsockopen error

Fsockopen error SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through April 16, 2015 » Fsockopen error « Previous || Next »
Author Message
Jose Rodrigues
New member
Username: Joserf

Post Number: 1
Registered: 04-2015
Posted on Wednesday, April 01, 2015 - 11:59 pm:   

$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 - 11:16 am:   

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

Login Login / Register Logout Logout Search Last 30 Days Topics Topics