Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello,
I have a sub-domain on a free hosting site.
It is a team site for another browser based
game I play (written in perl if that
matters). I have recently learned PHP and
decided to write a script to take info from
my team page and put it on my site. However
when I do so, I get an error message
stating:Warning: file_get_contents() [function.file-
get-contents]: URL file-access is disabled
in the server configuration in
/home/www/mbbombers.awardspace.com/testing.p
hp on line 2Is this a problem on the hosting site
(awardspace) or on the game I play?Here is my PHP script:
<?
if ($source =
file_get_contents("http://goallineblitz.com/
game/team.pl?team_id=4819")) {
$search = "Cash";
$newText = substr($source,strpos($source,
$search)+strlen($search), 16);
echo $newText;
} else {
echo "Error : Could not retrive data, please
contact administrator";
}?>

Edit: Here is my new debbuged code:
<?
if ($source =
file_get_contents("http://goallineblitz.com/g
ame/team.pl?team_id=4819")) {
$search = "Cash";
$newText = substr($source,strpos($source,
$search)+strlen($search), 16);
echo $newText;
} else {
echo "Error : Could not retrive data, please
contact administrator";}?>
However still expirecing the oringnal
problem:
Warning: file_get_contents() [function.file-
get-contents]: URL file-access is disabled in
the server configuration in
/home/www/mbbombers.awardspace.com/testing.ph
p on line 2Warning:
file_get_contents(http://goallineblitz.com/ga
me/team.pl?team_id=4819) [function.file-get-
contents]: failed to open stream: no suitable
wrapper could be found in
/home/www/mbbombers.awardspace.com/testing.ph
p on line 2I am a newbie at PHP, any help would be
appricated. If this is at my games server
side, is there any alternatives in getting
this information?

The error is pretty self explanatiory:
"URL file-access is disabled in the server configuration"
You get what you pay for. No alternatives that come to mind other than getting a real host.
Michael J

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |