Jump to content

Meteo VATSIM in the template


AlessandroCuba

Recommended Posts

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>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...