I am running under 4.3.3. The URL that is doing a redirect to a static HTML page is at http://www.cotrip.org/tms/tms.web.core.TravelInfoMarshal?mode=1
For some reason my script is not getting to the static page that my browser is redirected to. I am having a heck of a time figuring out what is going on. This used to work, leading me to believe they changed something on their end...
My code is below:
$url = "http://www.cotrip.org/tms/tms.web.core.TravelInfoMarshal?mode=1";
$fp = @fopen ($url, "r");
$webpage = "";
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
while (!feof ($fp)) {
$webpage .= fgets($fp, 4096);
}
fclose($fp);
$webpage = str_replace(chr(13),"",$webpage);
$look1 = '<b>I-70 DENVER-UTAH';
$look2 = '</center>';
$pos1 = strpos($webpage, $look1) + strlen($look1);
$pos2 = strpos($webpage, $look2, $pos1);
$line1 = substr($webpage, $pos1, $pos2 - $pos1);
}
$line1 = str_replace("<img src=\"images/CCTV_icon_black.jpg\" width=\"15\" height=\"10\" border=\"0\">","",$line1);
$line1 = str_replace("<img src=\"images/har.jpg.jpg\" width=\"20\" height=\"15\" border=\"0\">","",$line1);
$line1 = str_replace(" Closed Circuit Television<br>","",$line1);
$line1 = str_replace(" Highway Advisory Radios","",$line1);
$line1 = str_replace("<img src=\"images/har.jpg.jpg\" width=\"15\" height=\"10\" border=\"0\">","",$line1);
$line1 = str_replace("width=\"640\" ","",$line1);
$line1 = str_replace("<A HREF=\"All_Alerts","<A target=\"_blank\" HREF=\"http://www.cotrip.org/rWeather/All_Alerts",$line1);
echo "$line1";