Getting Sending Information | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through June 03, 2020 ⬆ |
◄ ► |
Author | Message | |||
gensupport New member Username: Gensupport Post Number: 41 Registered: 12-2017 |
Hi, I'm trying to run below xml url through a php script to get some information of nowsms sending. But I received this error "PHP Warning: file_get_contents(http://127.0.0.1:8800/admin/xmlstatus?user=admin&password=adminpassword): failed to open stream: HTTP request failed! HTTP/1.0 401 Auth Required" I already enabled all features under Web tab, but still received that error. Need your help in this case. Thanks in advance. $xmldata = file_get_contents("http://127.0.0.1:8800/admin/xmlstatus?username=admin&password=adminpassword"); $xml = simplexml_load_string($xmldata); echo $xml; | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8303 Registered: 10-2002 |
Hi, This appears to be a bug in recent releases. An interim version with a fix is available at https://www.nowsms.com/download/nowsms20181116.zip -bn Bryce Norwood Now SMS/MMS Support | |||
gensupport New member Username: Gensupport Post Number: 42 Registered: 12-2017 |
Hi Bryce, I'm still received the same error after update the version. | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8304 Registered: 10-2002 |
Hi, Then you must be encountering a different problem. Verify that the user account exists in "SMS Users" and that admin access is enabled for the account. I could definitely recreate a problem...a recent update caused username/password auth via URL not to work for /admin/xmlstatus requests. -bn | |||
gensupport New member Username: Gensupport Post Number: 43 Registered: 12-2017 |
Hi, Okay, problem solved already. Forgot to enable admin access for that user. Thanks. | |||
gensupport New member Username: Gensupport Post Number: 47 Registered: 12-2017 |
Hi Support, If I want use https instead of http for below link, is it I need change any setting? Can we use post method(in php) for username and password? file_get_contents(http://127.0.0.1:8800/admin/xmlstatus?user=admin&password=adminpassword) | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8306 Registered: 10-2002 |
Yes, you can use https in the same way | |||
gensupport New member Username: Gensupport Post Number: 49 Registered: 12-2017 |
Hi, I try already but return below error. Is it need enabled something from config? Warning: file_get_contents(): Failed to enable crypto in /home/test.php on line 6 Warning: file_get_contents(https://...): failed to open stream: operation failed i n /home//test.php on line 6 Notice: Trying to get property 'SMSOUTQ' of non-object in /home/test.php on line 10 SMS in Queue = Notice: Trying to get property 'SMSSent' of non-object in /home/test.php on line 11 Notice: Trying to get property 'MessagesToday' of non-object in /home/test.php on lin e 11 SMS Sent Today = Below is my script $xmldata = file_get_contents("https://127.0.0.1:8800/admin/xmlstatus?username=user&password=adminpassword"); $xml = simplexml_load_string($xmldata); echo "SMS in Queue = ". $xml->SMSOUTQ . "\r\n"; echo "SMS Sent Today = " . $xml->SMSSent->MessagesToday . "\r\n"; | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8309 Registered: 10-2002 |
Hi, Sorry for the delay in response. This feature was broken in the 2018.07.17-2018.10.01 versions. The 2018.11.21 version that I mentioned in another thread also fixes this problem. -bn Bryce Norwood Now SMS/MMS Support |