johnwayne77 Posted January 17, 2007 Share Posted January 17, 2007 i am trying to make a currency converter script. i have access to a good rss currency file.this is what I am trying to do:[b]go to url: http://www.infovalutar.ro/2007/1/17/USD.bnr , where <2007/1/17> would change everyday automatically so it will fetch the updated value of the currency.get what is shown on the USD.bnr page -- which is a text line -- and put it in a variable ($usdvalue)[/b]after that I believe I'll manage on my own with the mathematical calculations and what would be needed for completing the script.thanks. Link to comment https://forums.phpfreaks.com/topic/34576-how-to-get-the-content-of-an-url-and-put-it-in-a-variable/ Share on other sites More sharing options...
Tandem Posted January 17, 2007 Share Posted January 17, 2007 $blah = file_get_contents("url here"); Link to comment https://forums.phpfreaks.com/topic/34576-how-to-get-the-content-of-an-url-and-put-it-in-a-variable/#findComment-162880 Share on other sites More sharing options...
Pez Posted January 17, 2007 Share Posted January 17, 2007 <?php$conversion_rate = file_get_contents("http://www.infovalutar.ro/2007/1/17/USD.bnr");?> Although you will need to make a function to update the date of the URL to todays. Link to comment https://forums.phpfreaks.com/topic/34576-how-to-get-the-content-of-an-url-and-put-it-in-a-variable/#findComment-162881 Share on other sites More sharing options...
johnwayne77 Posted January 17, 2007 Author Share Posted January 17, 2007 great!works just finethanks Link to comment https://forums.phpfreaks.com/topic/34576-how-to-get-the-content-of-an-url-and-put-it-in-a-variable/#findComment-162886 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.