Website Media

Images for your website / forum etc..

We have been getting requests from people who are participating in the project, for some images (badges) they could put on their site to promote us.
The design team (read: Dan) has been hard at work fullfilling your wishes
There are plenty of designs to choose from:
Participate1 (250px X 250px) Participate1 (150px X 150px) Participate1 (100px X 100px)
 
 
Participate2 (250px X 250px) Participate2 (150px X 150px) Participate2 (100px X 100px)
 
 
Participate3 (250px X 250px) Participate3 (150px X 150px) Participate3 (100px X 100px)


Please download these images to your computer and upload them to your website, DO NOT link to the image on our website, as this will slow down the site for everyone.
You MUST where-ever you choose to use one of these images, ensure that a visitor clicking on the image will be directed to //www.iiccp.co.uk (you may use a target tag to send them to us in a different window)


You can now include your temperature league table on your website using PHP like this:
<?php
$file 
"http://www.iiccp.co.uk/stations/your_station_id/api";
//example: http://www.iiccp.co.uk/stations/bordersweather_co_uk/api
$json file_get_contents($file);
$json json_decode($json,true);
if (
$json['status']['code'] == -1) { echo "An error occured, server said: {$json['status']['msg']}"; exit; }

$now time();
if (
$json['status']['lastdata'] > 0) { $now $json['status']['lastdata']; }
$thedate date('MY',$now);
$mname date('F',$now);
$themonth date('M',$now);
$modyear $now;
?>

<a name="leaguetable">&nbsp;</a>
<table width="100%">
<tr><td><h1>Max Temperatures</h1></td><td><h1>Min Temperatures</h1></td></tr>
<tr><td>
<table width="80%"><tr class="table-top"><th>All Time</th><th>Month of <?php echo $mname?></th><th><?php echo date('Y',$modyear); ?></th></tr>
<?php

//echo "The Date: $thedate";
echo "<tr><td valign=\"top\">";
echo 
"<table width=\"100%\"><tr class=\"table-top\"><th>Month</th><th>Temp</th></tr>";
$count 0;
while (
$count count($json['all_max'])) {
if (
$count 11) { break; }
if (
$thedate == $json['all_max'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['all_max'][$count]['date']}</td><td{$col}>" .TempFormat($json['all_max'][$count]['temp']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Temp</th></tr>";
while (
$count count($json['month_max'])) {
if (
$count 11) { break; }
if (
$thedate == $json['month_max'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['month_max'][$count]['date']}</td><td{$col}>" .TempFormat($json['month_max'][$count]['temp']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Temp</th></tr>";
while (
$count count($json['year_max'])) {
if (
$themonth == $json['year_max'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['year_max'][$count]['date']}</td><td{$col}>" .TempFormat($json['year_max'][$count]['TempMax']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

?>
</tr></table>
</td>
<td>
<table width="80%"><tr class="table-top"><th>All Time</th><th>Month of <?php echo $mname?></th><th><?php echo date('Y',$modyear); ?></th></tr>
<?php
echo "<tr><td valign=\"top\">";
echo 
"<table width=\"100%\"><tr class=\"table-top\"><th>Month</th><th>Temp</th></tr>";
$count 0;
while (
$count count($json['all_min'])) {
if (
$count 11) { break; }
if (
$thedate == $json['all_min'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['all_min'][$count]['date']}</td><td{$col}>" .TempFormat($json['all_min'][$count]['temp']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Temp</th></tr>";
while (
$count count($json['month_min'])) {
if (
$count 11) { break; }
if (
$thedate == $json['month_min'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['month_min'][$count]['date']}</td><td{$col}>" .TempFormat($json['month_min'][$count]['temp']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Temp</th></tr>";
while (
$count count($json['year_min'])) {
if (
$themonth == $json['year_min'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['year_min'][$count]['date']}</td><td{$col}>" .TempFormat($json['year_min'][$count]['TempMin']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";
echo 
"</tr></table></table>";
?>

</tr></table>
</td></tr></table>

<table width="100%">
<tr><td><h1>Avg Temperatures</h1></td><td><h1>Rain</h1></td></tr>
<tr><td>
<table width="80%"><tr class="table-top"><th>All Time</th><th>Month of <?php echo $mname?></th><th><?php echo date('Y',$modyear); ?></th></tr>
<?php

//echo "The Date: $thedate";
echo "<tr><td valign=\"top\">";
echo 
"<table width=\"100%\"><tr class=\"table-top\"><th>Month</th><th>Temp</th></tr>";
$count 0;
while (
$count count($json['all_temp_avg'])) {
if (
$count 11) { break; }
if (
$thedate == $json['all_temp_avg'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['all_temp_avg'][$count]['date']}</td><td{$col}>" .TempFormat($json['all_temp_avg'][$count]['tavg']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";
echo 
"<!-- ";
print_r($json);
echo 
" -->";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Temp</th></tr>";
while (
$count count($json['month_temp_avg'])) {
if (
$count 11) { break; }
if (
$thedate == $json['month_temp_avg'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['month_temp_avg'][$count]['date']}</td><td{$col}>" .TempFormat($json['month_temp_avg'][$count]['tavg']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Temp</th></tr>";
while (
$count count($json['year_temp_avg'])) {
if (
$themonth == $json['year_temp_avg'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['year_temp_avg'][$count]['date']}</td><td{$col}>" .TempFormat($json['year_temp_avg'][$count]['TempAvg']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

?>
</tr></table>
</td>
<td>
<table width="80%"><tr class="table-top"><th>All Time</th><th>Month of <?php echo $mname?></th><th><?php echo date('Y',$modyear); ?></th></tr>
<?php
echo "<tr><td valign=\"top\">";
echo 
"<table width=\"100%\"><tr class=\"table-top\"><th>Month</th><th>Rain</th></tr>";
$count 0;
while (
$count count($json['all_rain'])) {
if (
$count 11) { break; }
if (
$thedate == $json['all_rain'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['all_rain'][$count]['date']}</td><td{$col}>" .RainFormat($json['all_rain'][$count]['rain']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Rain</th></tr>";
while (
$count count($json['month_rain'])) {
if (
$count 11) { break; }
if (
$thedate == $json['month_rain'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['month_rain'][$count]['date']}</td><td{$col}>" .RainFormat($json['month_rain'][$count]['rain']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";

$count 0;
echo 
"<td valign=\"top\"><table width=\"100%\"><tr class=\"table-top\"><th>Date</th><th>Rain</th></tr>";
while (
$count count($json['year_rain'])) {
if (
$themonth == $json['year_rain'][$count]['date']) { $col " style=\"background: yellow; font-weight: bold;\""; } else { $col ""; }
    echo 
"<tr><td{$col}>{$json['year_rain'][$count]['date']}</td><td{$col}>" .RainFormat($json['year_rain'][$count]['Rain']) ."</td></tr>";
$count++;
}
echo 
"</table></td>";
echo 
"</tr></table></table>";
?>

</tr></table>
</td></tr></table>

<?php
function TempFormat($temp) {
if ((
$temp 10) AND ($temp >= 0.0)) { $temp "0{$temp}"; } //9.9 - -0.0
if (($temp <= -0.1) AND ($temp >= -9.9)) { $temp str_replace("-","-0",$temp); }
if (
$temp >= 0.0) { $temp "&nbsp;{$temp}"; }
if (
stristr($temp,".") === FALSE) { $temp .= ".0"; }
return 
$temp;
}

function 
RainFormat($rain) {
$rain round($rain,1);
if (
$rain 10) { $rain "&nbsp;&nbsp;&nbsp;&nbsp;{$rain}"; }
elseif (
$rain 100) { $rain "&nbsp;&nbsp;{$rain}"; }
if (
stristr($rain,".") === FALSE) { $rain .= ".0"; }
return 
$rain;
}
?>

Station Database Options




freeliving