Http://userAdmin:pwdAdmin@ip:port/ HTTP query

Http://userAdmin:pwdAdmin@ip:port/ HTTP query SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through January 22, 2009 » Http://userAdmin:pwdAdmin@ip:port/ HTTP query « Previous || Next »
Author Message
Posted on Tuesday, January 20, 2009 - 07:37 am:   

Hi Bryce,
i tray to execute http request to :
- create account
- create DList
- Add credit
by using a combinaison of http://userAdmin:pwdAdmin@ip:port/

The need : process http requests from a dedicated server to nowsms.

This's an http request sample:

Warning: file_get_contents(http://userAdmin:pwdAdmin@ p23)

userAdmin = Admin login
pwdAdmin = Admin password
User = User account
Password = Pwd account

The erreur message Is :
[function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 401 Authorization Required in

any help plz ?

Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 373
Registered: 08-2008
Posted on Tuesday, January 20, 2009 - 06:14 pm:   

Hi Marrakech,

You can simply use the "User=" and "Password=" URL parameters instead of "user:password@" in the host name part of the URL.

Not all HTTP libraries (or browsers) support the "user:password@" syntax ... this is borrowed from the FTP URL format, and is more commonly supported for FTP requests. When an HTTP library or browser does support this syntax, it builds an "Authorization:" header.

When NowSMS parses the URL request, first it looks at the "Authorization:" header. Then, if it can't find that, it looks for the "User=" and "Password=" URL parameters.

NowSMS Support

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