On Monday 03 November 2008 20:04, Julien Cornuwel wrote:
> 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.

Now you can. Sorry.

However, you're right that it should be a cron job. Nextgens, can you arrange 
this, once a day, please?
> 
> 
> > 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: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20081103/35ec641e/attachment.pgp>

Reply via email to