Welcome to PHPBuilder! Please use [noparse]
[/noparse] BBCode tags around all PHP code to make it easy on board layout and other users analyzing your code.
Wefferiscoding wrote:I do not know what '?s=' . $symbol . '&e=.csv&f=sl1d1t1c1ohgv'; means and what it has to do with the website that this code is getting the stock quote from.
In order to write the example code you have, some ardent programmer 😃 went to Yahoo's Finance site and observed what happened there when he/she wanted to read the stock quote for Amazon.com.
One of the first things you should do is visit bankrate.com and find where the LIBOR is displayed. Take a look at the source code around that area, as that's what you'll be receiving back from a call to [man]file_get_contents/man.
And, finally, this is probably over the top for a newbie, but have a look at stream_context_create and be a good Netizen:
$context_options = array(
'http'=>array(
'timeout'=>600,
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"User-Agent: Wefferiscoding@yourdomain.com/0.1 (Windows i386; U; en-us) Wefferiscoding_Libor_scraper 0.1\r\n"
)
);
$context = stream_context_create($context_options);
Then when you call [man]file_get_contents/man:
$data = file_get_contents("http://bankrate.com/something",0,$context);
HTH,