Jump to content

[SOLVED] file_get_contents


tejama

Recommended Posts

Hi folks,

 

Wondering if you can give me a hand.  Here's part of my code:

 

  $theurl = 'http://scores.espn.go.com/mlb/Statistics/Team/playerstats?team=det';
  $contents = file_get_contents($theurl);

 

All I'm trying to do is open the page so that I can parse the info I want later.  Here is the error I get:

 

Warning: file_get_contents(http://scores.espn.go.com/mlb/Statistics/Team/playerstats?team=det) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\uni\fns_output.php on line 1226

 

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\uni\fns_output.php on line 1226

 

Note: I'm running this on localhost, but I don't believe that should make a difference.  Any help is appreciated.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.