I'm trying to grab text from a site, but the URL i want to grab from does not work. I get this error:
Warning: fopen("the-url-here", "r") - No error in script.php on line 13
Do someone know why this doesn't work:
(Note: I had to split up the url cause it scrambled up the tables on the board...)
fopen("$URL", "r");
While
$URL = "http://www.shahid.org.uk:81/?
IMEI=123456789876543&Model=2&country=20&Network=62501&
MyNetwork=CVMOVEL&MySite=www.shahid.org.uk%2Fdct4%
2F&submit=Generate+Unlock+Code"
The whole script here:
<?php
$strurl = "http://www.shahid.org.uk:81/?
IMEI=123456789876543&Model=2&country=20&Network=62501&
MyNetwork=CVMOVEL&MySite=www.shahid.org.uk%2Fdct4%
2F&submit=Generate+Unlock+Code";
$fh = fread(fopen(urlencode($strURL)),'r');
if ($fh)
{
$start = strpos($fh, "Click");
$stopp = strpos($fh, "new");
$lengde = $stopp-$start;
$kode = substr($fh, $start, $lengde);
echo $kode;
}
?>