blerta
blerta

Reputation: 129

PHP - file get content failed to open stream from URL

i have this piece of code which permits me to retrieve the information from a link... now, it says failed to open stream... here is the code:

Thanks!

$b = time ();
$date1 =date( "Y-m-d;h:i:s" , mktime(date("h")+6, date("i"), date("s"), date("m") , date("d"), date("Y")));
$str_time = "";
$str_msg = "";
$str_from = "";
$str_zip = "";

echo file_get_contents('href="http://testext.i-movo.com/api/receivesms.aspx?".$str_from."".$str_zip."".$phone."".$str_time."".$date1."".$str_msg.""');
}

Upvotes: 1

Views: 142

Answers (2)

rsz
rsz

Reputation: 1161

This:

echo file_get_contents('href="http://testext.i-movo.com/api/receivesms.aspx?".$str_from."".$str_zip."".$phone."".$str_time."".$date1."".$str_msg.""');

Should be this:

echo file_get_contents("http://testext.i-movo.com/api/receivesms.aspx?".$str_from.$str_zip.$phone.$str_time.$date1.$str_msg);

Upvotes: 2

dbf
dbf

Reputation: 3463

please read the documentation for file_get_contents

the example says

$homepage = file_get_contents('http://www.example.com/');
echo $homepage;

you are using

$homepage = file_get_contents('href="http://www.example.com/');

now what is wrong ..

Upvotes: 0

Related Questions