๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1695

Re: la uf del dia

#1695
From: Rickoj
Date: Sat, 24 Jun 2006 18:24
39 lines
1756 bytes
"Hector Vergara R." <hvergara@es-gmail.com> escribi๏ฟฝ en el mensaje
news:e7ih9h$6vc$1@news.nivel5.cl...
> 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!

gracias si es php

y segun veo si me sirve con las uf de otros dias

muchas gracias
Technical Details
Message-ID: <e7k004$gkc$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
References: <e7i85m$4l0$1@news.nivel5.cl> <e7ih9h$6vc$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!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
From: "Rick_oj" <rick_oj@[sin-esto]tutopia.com>
Newsgroups: chile.comp.programacion
Subject: Re: la uf del dia
Date: Sat, 24 Jun 2006 14:24:05 -0400
Organization: Varios
Lines: 41
Message-ID: <e7k004$gkc$1@news.nivel5.cl>
References: <e7i85m$4l0$1@news.nivel5.cl> <e7ih9h$6vc$1@news.nivel5.cl>
NNTP-Posting-Host: pc-131-200-120-200.cm.vtr.net
X-Trace: news.nivel5.cl 1151173444 17036 200.120.200.131 (24 Jun 2006 18:24:04 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Sat, 24 Jun 2006 18:24:04 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000