Getting Sending Information

Getting Sending Information SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Getting Sending Information « Previous || Next »
Author Message
gensupport
New member
Username: Gensupport

Post Number: 41
Registered: 12-2017
Posted on Friday, November 16, 2018 - 07:48 am:   

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
Posted on Friday, November 16, 2018 - 03:47 pm:   

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
Posted on Monday, November 19, 2018 - 03:02 am:   

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
Posted on Tuesday, November 20, 2018 - 06:14 pm:   

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
Posted on Wednesday, November 28, 2018 - 02:30 am:   

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
Posted on Wednesday, January 02, 2019 - 02:55 am:   

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
Posted on Friday, January 04, 2019 - 04:44 pm:   

Yes, you can use https in the same way
gensupport
New member
Username: Gensupport

Post Number: 49
Registered: 12-2017
Posted on Monday, January 07, 2019 - 09:25 am:   

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
Posted on Monday, January 14, 2019 - 08:58 pm:   

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

Add Your Message Here, or click here to create a new discussion topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Click here to create an account.
Username:
Password:
Options: Automatically activate URLs in message
Action:

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