Problems getting URL with file_get_contents
Posted: Sat Mar 08, 2008 5:57 am
hello 
over the last 8 weeks I have been diving into the world of php and I love it.
I have a background working with Perl and find it fun to use it on the web.
I was trying to parse a website and the file_get_contents function refuses to return the URL that I wish to parse.
The code is very simple:
$source = "http://quicktake.morningstar.com/FundNe ... mbol=VIIIX";
$source = urlencode($source);
$handle = file_get_contents($source);
print_r($handle);
This has worked for me for other URLs but this particular one does not want to load in.
Any clues to what I am doing wrong?
Is there a clear rule(or function) to know what URLs can be parsed and which ones cannot?
thanks so much.
over the last 8 weeks I have been diving into the world of php and I love it.
I have a background working with Perl and find it fun to use it on the web.
I was trying to parse a website and the file_get_contents function refuses to return the URL that I wish to parse.
The code is very simple:
$source = "http://quicktake.morningstar.com/FundNe ... mbol=VIIIX";
$source = urlencode($source);
$handle = file_get_contents($source);
print_r($handle);
This has worked for me for other URLs but this particular one does not want to load in.
Any clues to what I am doing wrong?
Is there a clear rule(or function) to know what URLs can be parsed and which ones cannot?
thanks so much.