Ok, I am trying to import content from a forest fire bulletin, but each time it is updated they change the filename..
I can find out what the filename is from Page A by doing this:
<?
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$url1="http://www.community.gov.yk.ca/firemanagement/";
$fileopen1=file($url1);
$count1=count($fileopen1);
for($i=0;$i<$count1;$i++){
$filegets1.=$fileopen1[$i];
}
$tmpget1_1=explode("/firemanagement/",$filegets1);
$bulletinlink=explode(".html",$tmpget1_1[1]);
This gives me the filename but I need to add ".html" to the end of it and then express it as $finalfilename and place it inside the following:
$url="http://www.community.gov.yk.ca/firemanagement $finalfilename.html";
$fileopen=file($url);
$count=count($fileopen);
for($i=0;$i<$count;$i++){
$filegets.=$fileopen[$i];
}
$tmpget_1=explode("contentbeginmarker",$filegets);
$result=explode("contentendmarker",$tmpget_1[1]);
echo $result[0];
?>
As you can tell my php knowledge is quite basic, so any assistance is appreciated!!