<?
/*    
    Previs�o do tempo via cnn.com.br (pode ser adaptado para outros sites e fun��es)

    autor: Necromenon
    mail: necromenon@network.com.br
    
*/ 
?>


<style><!--
.Bnr2, .Bnr2:link, .Bnr2:visited
{color:#ff6600;}

.Bnr3
{
font-family:arial,helvetica,sans-serif;
font-weight:bold;
font-size:22px;
color:#DD0000;
text-decoration:none;
}

.redtemps
{
font-family:arial,helvetica,sans-serif;
font-weight:bold;
font-size:14px;
color:#DD0000;
text-decoration:none;
}

.greytemps
{
font-family:arial,helvetica,sans-serif;
font-weight:bold;
font-size:14px;
color:#222222;
text-decoration:none;
}

.WHeader
{
font-family:arial,helvetica,sans-serif;
font-weight:bold;
font-size:14px;
color:#ff6600;
text-decoration:none;
}

.FSnPSmLt            
{
font-family:arial,helvetica,sans-serif;
color:#ffcc99;
size:12px;
}

.FSnPSmDk
{
font-family:arial,helvetica,sans-serif;
font-size:12px;
color:#000000;
}    

.FSnBSmDk12
{
font-family:arial,helvetica,sans-serif;
font-size:12px;
font-weight:bold;
color:#000000;
}    

--></style> 


<?php

//Mude para a URL da sua cidade
$url = "http://www.cnn.com.br/tempo/cidades/sa/Brazil/ParanaguaSBPG.html/";

$abrir = fopen($url, "r") or die ("N�o foi possivel abrir o endere�o $url");
$ler = fread($abrir, 20000) or die ("N�o foi possivel ler o arquivo");
fclose($abrir); 

$retirar = eregi("<table WIDTH=460 CELLSPACING=0 CELLPADDING=0 BORDER=0>(.*)\n<!--------------------------S", $ler, $mostrar) or die ("Problemas na Formata��o");

$mostre = $mostrar[1];

echo $mostre;

?>