I know there are PHP restrictions for using this script. I have a rather simple script that doesn't seam to work. Can someone help me modify it so it can work within webtemplates? I'm not sure if it's possible or not but it would be great if it was!
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>U.S. Geological Survey</title>
</head>
<body>
<table>
<thead>
<tr>
<td>USGS</td>
<td>Station</td>
<td>Date</td>
<td>Time</td>
<td>Height</td>
<td>CFS</td>
<td>Temperature</td>
</tr>
</thead>
<tbody>
<?php
$content=file("http://waterdata.usgs.gov/ny/nwis/uv?format=rdb&period=1&site_no=01427510");
foreach($content as $line)
{
if( substr($line, 0, 4)=="USGS" )
{
echo "<tr>";
$column = explode("\t", $line);
echo "<td>".$column[0]."</td>";
echo "<td>".$column[1]."</td>";
echo "<td>".date("j F Y" ,strtotime($column[2]))."</td>";
echo "<td>".date("H:i:s" ,strtotime($column[2]))."</td>";
echo "<td>".$column[3]."</td>";
echo "<td>".$column[4]."</td>";
echo "<td>".$column[5]."</td>";
echo "</tr>";
}
}
?>
</tbody>
</table>
</body>
</html>