Article View: chile.comp.programacion
Article #1690Re: la uf del dia
From: Hector Vergara R.
Date: Sat, 24 Jun 2006 05:06
Date: Sat, 24 Jun 2006 05:06
43 lines
1702 bytes
1702 bytes
bajo que lenguaje?
Si es PHP, prueba con esto:
(lo hice recien, asi que deberia funcionar)
<?php
function getUF() {
$data =
file_get_contents('http://www.bci.cl/common/include/indicadores.dat');
preg_match('/'.date('_d_m_Y').'="(.+?)"/', $data, $matches);
return empty($matches)?false:$matches[1];
}
// Ejemplo de Uso
$uf_de_hoy = getUF();
if($uf_de_hoy !== false) {
print "La UF de Hoy es: {$uf_de_hoy}";
} else {
print "No se pudo encontrar la UF para hoy...";
}
?>
Espero que te sirva...
Saludos!
"Rick_oj" <rick_oj@[sin-esto]tutopia.com> escribi๏ฟฝ en el mensaje
news:e7i85m$4l0$1@news.nivel5.cl...
> cual era el sitio?
> o como es el asunto de obtenerla, es de agun RSS
>
> gracias
>
>
Technical Details
Message-ID:
<e7ih9h$6vc$1@news.nivel5.cl>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mailReferences:
<e7i85m$4l0$1@news.nivel5.cl>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,a03ebcafeeec5d3a X-Google-Attributes: gid1593cb,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail From: "Hector Vergara R." <hvergara@es-gmail.com> Newsgroups: chile.comp.programacion Subject: Re: la uf del dia Date: Sat, 24 Jun 2006 01:06:53 -0400 Organization: Varios Lines: 45 Message-ID: <e7ih9h$6vc$1@news.nivel5.cl> References: <e7i85m$4l0$1@news.nivel5.cl> NNTP-Posting-Host: pc-75-16-83-200.cm.vtr.net X-Trace: news.nivel5.cl 1151125617 7148 200.83.16.75 (24 Jun 2006 05:06:57 GMT) X-Complaints-To: news@news.nivel5.cl NNTP-Posting-Date: Sat, 24 Jun 2006 05:06:57 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original