Re: [Linux-programlama] doviz kurlari

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: A OKAN YÜKSEL (kaox.gen@gmail.com)
Date: Sat 04 Nov 2006 - 22:28:22 GMT


http://www.knyksl.com/kurlar.phps ntvmsnbc 'den kur bilgilerini çeken script
yazmıştım umarım işinize yarar
saygılar

On 11/4/06, Atif CEYLAN <atifceylan@gmail.com> wrote:
>
> Fatih Dirol yazmış:
> > Selamlar,
> > TCMB döviz kurlarını alıp güncelleyen bir php scriptîne ihtiyacım var.
> > Yardımcı olabilecek arkadaşlara şimdiden teşekkürler.
> > İyi günler.
> >
> > F.Dirol
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Linux-programlama mailing list
> > Linux-programlama@liste.linux.org.tr
> > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >
> $tcmb_today = @file("http://www.tcmb.gov.tr/kurlar/today.html");
>
> if($tcmb_today)
> {
>
> $tcmb_today = implode("", $tcmb_today);
> $tcm_today = ereg_replace("\r", "", $tcmb_today);
>
> $USD_start = strpos($tcmb_today, "ABD DOLARI");
> $EUR_start = strpos($tcmb_today, "EURO");
>
> $USD_tcmb_today = trim(substr($tcmb_today, $USD_start+21, 35));
> $EUR_tcmb_today = trim(substr($tcmb_today, $EUR_start+21, 35));
>
>
> while ( ereg( "[ ]{2,}", $USD_tcmb_today)>0 )
> $USD_tcmb_today = ereg_replace( "[ ]{2,}", " ", $USD_tcmb_today );
> $EUR_tcmb_today = ereg_replace( "[ ]{2,}", " ", $EUR_tcmb_today );
>
>
> $USD_tcmb_today = explode(" ",$USD_tcmb_today);
> $EUR_tcmb_today = explode(" ",$EUR_tcmb_today);
>
>
> $USD = array ( number_format((int)ereg_replace( ",", "",
> $USD_tcmb_today[0] ), 0, ",", "."), number_format((int)ereg_replace(
> ",", "", $USD_tcmb_today[1] ), 0, ",", "."));
> $EUR = array ( number_format((int)ereg_replace( ",", "",
> $EUR_tcmb_today[0] ), 0, ",", "."), number_format((int)ereg_replace(
> ",", "", $EUR_tcmb_today[1] ), 0, ",", "."));
>
> echo "DolarAlis='$USD_tcmb_today[0]'\n
>
> DolarSatis='$USD_tcmb_today[1]'\nEuroAlis='$EUR_tcmb_today[0]'\nEuroSatis='$EUR_tcmb_today[1]'";
>
> }
>
> ?>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>

-- 
http://www.knyksl.com/

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.