Cotações
Previsão Tempo
NFE
Nota Fiscal Eletrônica
Consulte sua Nota Fiscal aqui!
Webmail
Nome:
Senha:
 
Fale Conosco
Rod. Sebastião Teixeira Coelho-Km 7
Santa Cruz do Rio Pardo-SP
Fone: (14) 3332-3030
E-mail: scarpim@scarpimcereais.com.br
Notícias e informativos
(.*?)|s"; preg_match_all($preg, $string, $tags); foreach ($tags[1] as $tmpcont){ $tmpval[] = $tmpcont; } $tmpval = str_replace("", "", $tmpval); $tmpval = str_replace("\"", " ", $tmpval); $tmpval = str_replace("'", " ", $tmpval); $tmpval = str_replace(""", " ", $tmpval); $tmpval = str_replace("&", "&", $tmpval); $tmpval = str_replace("&", " ", $tmpval); $tmpval = str_replace("´", "", $tmpval); $tmpval = str_replace("<", "<", $tmpval); $tmpval = str_replace(">", ">", $tmpval); return $tmpval; } $items = array(); $feed_url = 'http://news.google.com.br/news?um=1&ned=pt-BR_br&hl=pt-BR&q=soja&output=rss'; $ch = curl_init($feed_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, 0); if(curl_exec($ch)){ $data = curl_exec($ch); curl_close($ch); $xml = $data; } $items = array_merge($items, untag($xml, 'item')); for($i=1; $i<=7; $i++){ $title = untag($items[$i], 'title'); $link = untag($items[$i], 'link'); $description = untag($items[$i], 'description'); if(strlen($title[0]) > 0 and strlen($link[0]) > 0){ $title = $title[0]; $title = strip_tags($title); $title = utf8_decode($title); echo "» ". $title ."

"; }else{ $i=10; } } ?>
by CPWM-Comunicação