View Single Post
  #1 (permalink)  
Old Nov 28th, 2005, 12:59
btfans btfans is offline
New Member
Join Date: Nov 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
PHP question (newbie)

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?srchDa...=2005&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/resu...=2005&teamName=
and the display on my server again ?? Many Thanks.
Understand that:
1) after ballr1.php display the site html first time, the history data can be enquired by pressing the 'Search' button inside
but ballr1.php need intercept this button to form a link fist like:
http://mylink.com/ballr1.php?srchRes...=2005&teamName=
but not just
http://mylink.com/srchRes.asp?srchDa...=2005&teamName=
2) when the ballr1.php is invoked again with the variable parameters (from/to dates etc.), it need to do something
to change the base url to:
http://bet.hkjc.com/football/en/resu...=2005&teamName=
I am really newbie to php, so appreciated anyone point me the solution code.

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>

Last edited by btfans; Nov 29th, 2005 at 05:17.