Question : httprequest in Php

Hi experts,

I have a piece of code, which I have a problem with.
if I remove the calls from the database of the text and put it hard coded it works...
else I get a "Bad Request" from the other server.

The database result is ok, and if I paste the URL to a command line it works... only from the page it doesn't

Can you direct me what I'm doing wrong? I've tried putting trim instead of the htmlspecialchars but no luck..

Meir.
1:
2:
3:
4:
5:
$url="http://xxx/pushsms.asp?UserName=XXXXX&Password=XXXXX&ToPhoneNumber=".$row2['smsnumPhone']."&Message=".htmlspecialchars ($row['compsysname'])." in ".htmlspecialchars ($row['compname'])." not responding since ".date("H:i",strtotime ($row['testdate']))."&Sender=dd";
		echo $url;
		$r= new HttpRequest($url, HttpRequest::METH_GET);
		$r->send () ;
		echo $r->getResponseBody();

Answer : httprequest in Php

I'm wondering if you might not try just using file_get_contents() to "GET" the remote URL?

Also, I think I would choose urlencode() for those URL strings.
Random Solutions  
 
programming4us programming4us