Import data from external website

Hey guys,

I’m making a fansite for a football club. Here I’m displaying the squad and every player will get a personal profile. I want their statistics to be displayed like: appearances, goals, assists etc.

It takes a lot of time to update this manually for an entire squad, because they play twice a week. Now there is this great website which has the statistics always up to date: transfermarkt.co.uk/ajax-amsterdam/leistungsdaten/verein/610/reldata/&2012

Is there a possibility to import the data from that website to specific player profiles and let it refresh once a day? All stats per player needed are in the url I posted above.

Looking forward to a solution. Thanks in advance!

Greets,

Peter

Do you have access to that webpages database?

If not, then the only way I can think of is running a script that searches for each players name then outputs what you want on the page.

eg.

[php]$page = file_get_contents(‘http://www.transfermarkt.co.uk/ajax-amsterdam/leistungsdaten/verein/610/reldata/&2012’);

foreach($member as $player){
$pattern = ‘’; // Include $player within pattern
$output .= preg_match($pattern,$page); // So grab the specific table for the players data from the pattern including players name

//Then process the information from the row you just grabbed and save the data
}[/php]

Someone may have a better way of doing it. The key would be making sure you get the correct preg_match pattern to isolate the data. But thats something you can do.

Sponsor our Newsletter | Privacy Policy | Terms of Service