Jump to content

file_get_contents doesn't get everything?


Recommended Posts


I am trying to grab some data from a site, but my blocker at the moment is that the site has a button near the end of the page, that opens up more data.

It's th ebutton that says "Show All"


Using file get contents, I don't get this "hidden data".


Any ideas please? I'm a novice and am using this code:

echo strip_tags(file_get_contents("http://www.sportinglife.com/football/live/vidiprinter"));

Thank you.

Link to comment
Share on other sites

Forget about the main page and use the URL


It provides a machine-friendly JSON representation of the data.


In any case, make sure that scraping the website doesn't violate the terms of service. There may also be an official API where you can get the data from.

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.

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.