The various Central Banks, for example the ECB, provide Forex rates free to the public.
There is a PEAR package for Forex Rates and it is also not hard to code it yourself. Since the data is usually updated on a daily basis, you will want to add caching, so as not to hammer the bank's server.
However, if your application is doing any time-critical conversion, you should resort to a commercial service, as these usually update more frequently. I think Yahoo and Google have a financial API and someone already mentioned XE.com.