A tricky screen scraper
Posted: Thu Nov 24, 2005 11:43 am
PHP question (newbie)
As my Company block this ball result page, I (newbie) write this little php code try
to get the text(not graph) of the page and display using my server:
http://mylink.com/ballr1.php (code as bottom)
The problem is it show very good the first page but not the history data link
that can be enquired inside, because the url became
http://mylink.com/srchRes.asp?srchDate= ... &teamName=
which must be 404 url not found!
My question:
Any advise how the below code can be change such that I can actually get
http://bet.hkjc.com/football/en/results ... &teamName=
and the display on my server again ?? Many Thanks.
ballr1.php
As my Company block this ball result page, I (newbie) write this little php code try
to get the text(not graph) of the page and display using my server:
http://mylink.com/ballr1.php (code as bottom)
The problem is it show very good the first page but not the history data link
that can be enquired inside, because the url became
http://mylink.com/srchRes.asp?srchDate= ... &teamName=
which must be 404 url not found!
My question:
Any advise how the below code can be change such that I can actually get
http://bet.hkjc.com/football/en/results ... &teamName=
and the display on my server again ?? Many Thanks.
ballr1.php
Code: Select all
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Result</title>
</head>
<body>
Result
<hr><br>
<?
$file = "http://bet.hkjc.com/football/en/results/results.aspx";
$contents = file($file);
$size = sizeof($contents);
for($i = 0; $i < $size; $i++) {
$alldata = $contents[$i];
echo $alldata; }
?>
</body>
</html>