AlessandroCuba Posted January 23, 2013 Report Share Posted January 23, 2013 Small code showing the VATSIM weather in the template, random <div id="metar"> <?php $sql = "SELECT ".TABLE_PREFIX."airports.id, ".TABLE_PREFIX."airports.icao as icao, ".TABLE_PREFIX."airports.name, ".TABLE_PREFIX."airports.country as country FROM ".TABLE_PREFIX."airports ORDER BY RAND() LIMIT 1"; $result = mysql_query( $sql ); while ($row = mysql_fetch_row($result)) { echo"<h3>METAR (ICAO: ".$row[1].")</h3>"; echo "Aeropuerto: <font color='#ff6600'>".$row[2]."</font><br />"; $adresse = 'http://metar.vatsim.net/metar.php?id='; $homepage = file_get_contents($adresse.''.$row[1]); echo "<font color='#2997ba'>".$homepage."<font>"; } ?> </div> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.