I want to get the first number on the right table td under FIFA Ranking position. That would be 88 right now. Upon inspection, it is
88.How would I use PHP to extract the info from said webpage?
edit: I am told JQuery/JavaScript it is for this... better suited
解决方案
This could probably be prettier, but it'd go something like:
$page = file_get_contents("http://www.fifa.com/associations/association=chn/ranking/gender=m/index.html");
preg_match('/
[0-9]*/',$page,$matches);foreach($matches as $match){
echo str_replace(array( "/
", ""), "", $match);}
?>
I've never done anything like this before with PHP, so it may not work.
If you can work your magic after page load, you can use JavaScript/JQuery
var arr = [];
jQuery('table td.c').each(
arr[] = jQuery(this).html();
);
return arr;
Also, sorry for deleting my comment. You weren't specific as to what needed to be done, so I initially though jQuery would better fit your needs, but then I thought "Maybe you want to get the page content before an HTML page is loaded".