Henrik,
You can format the number anyway you want without any change from the source....
If you need only 1 digit instead of the two...
If $DAY = "09" and $yearnum = "2007"...
$filename = 'windtempraintrend' . intval($DAY) . $yearnum . ".gif";
Will produce: windtempraintrend92007.gif
or
$filename = 'climatedataout' . intval($DAY) . $yearnum . ".html";
Will produce: climatedataout92007.html
Hi Kevin
I have your great script up and running and I have figured out how to present the monthly .gifs produced by WD.
See example here:
www.buskelundtoften.dk/vejret/1rapporter.phpTry and get November 2007 daily report - here you see all the month-stamped .gifs from November 2007.
Now I only need to fix the 1-digit filename. Im not sure how to do that - I have looked at your code above - but am in doubt where to place the code.
Here is the code I use in the avgextract.php:
if ($LEVEL == 0 ) {
if ( strpos ($value,"Daily report for ") !== false ) {
preg_match("/Daily report for (.*)\</U",$value,$found);
$month = $found[1];
echo "<h1>Daily Report for the month of " . $month . "</h1>";
echo ' <img src="' . $website . $monthnum . $yearnum . 'monthtodate' . '.gif">
<br/>' . "\n";
echo ' <img src="' . $website . $monthnum . $yearnum . 'alltimerecordsmonth' . '.gif">
<br/>' . "\n";
echo ' <img src="' . $website . 'windtempraintrend' . $monthnum . $yearnum . '.gif">
<br/>' . "\n";
echo ' <img src="' . $website . 'windtempraintrend3d' . $monthnum . $yearnum . '.gif">
<br/>' . "\n";
echo ' <img src="' . $website . $yearnum . $monthnum . 'windrose' . '.gif">
<br/>' . "\n";
$LEVEL = 1;
}
}Thank you very much for your help and all your great scripts.
Best regards,
Henrik
Ps. How is your new phone? Is it a good toy?
I just got a new digital camera - Ricoh Caplio R7 - great with some new toys.