toad at freenetproject.org a ?crit :
> Author: toad
> Date: 2008-11-03 19:28:41 +0000 (Mon, 03 Nov 2008)
> New Revision: 23292
> 
> Modified:
>    trunk/website/pages/en/news.php
> Log:
> Update $:?\194?\163 ratio from xe.com on 03/11/08.
> I will update this when I remember, hopefully once a week.


You can fetch the ratio from Yahoo directly with something like this :

$fp =
fopen('http://fr.finance.yahoo.com/d/quotes.csv?s=USDGBP=X&f=snl1d1t1c1ohgv&e=.csv',"r");
$content = fread($fp,1024);
$fields = explode(';',$content,5);
$ratio=$fields[2];

You might want to do it in a cron task and store the value in a file, to
avoid delays.

I tried to do it myself but I'm not allowed to commit on the website
part of the SVN.


> Modified: trunk/website/pages/en/news.php
> ===================================================================
> --- trunk/website/pages/en/news.php   2008-11-03 10:02:41 UTC (rev 23291)
> +++ trunk/website/pages/en/news.php   2008-11-03 19:28:41 UTC (rev 23292)
> @@ -11,7 +11,7 @@
>               fclose($handle);
>  
>               $totalUSD = ($paypalTotal + 4820.11);
> -             $totalBGP = $totalUSD * 0.61460;
> +             $totalBGP = $totalUSD * 0.63354;
>               $days = round($totalBGP / ((4 * 30 * 12 * 1.039 * 1.025 + 
> 80)/(365.25/12)));
>               echo "
>  <h3>Financial Status</h3>
> 
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20081103/e1564487/attachment.pgp>

Reply via email to