Hi btfans,
Listen, forgive my rant earlier - I'm just having a hard day.
I hope you don't think I'm not being helpful, it's just that what you are looking for is a lot of work.
As far as the hkjc.com site is concerned, it has to think that it is being accessed directly by a normal user on a normal browser or things won't work as they have designed them.
We both know it won't be accessed by a normal user on a normal browser. It will be accessed by a script running on your site. So, this script has to do everything which a normal browser would do - specifically it has to accept any cookies which hkjc wants to send it, and it has to share those cookies with hkjc just the same as a normal browser would. Anthing less than that and hkjc might not be able to work as expected.
That's one side of the system.
The other side is that your program has to display all of the contents, and make sure that anyone clicking on anything on the webpage goes back to your script instead of straight to hkjc (which would be blocked by your proxy. This means that a link to http://www.hkjc.com/page.1html would need to be rewritten as something like http://www.yoursite.com/hkjcscript.php?page=/page1.html
Any references images would need to be redirected in the same way to something like http://www.yoursite.com/hkjcimage.php?img=/images/football.jpg which would request the image from hkjc and display it as if it was stored on your server.
Can you see how this is a big and complicated piece of work?
If you plan on sharing your system with friends, this is an extra complication. You will need to make sure that your script can keep track of which requests come from you and which come from your friend, and serve up the appropriate cookies with the request.
And the whole system could very likely fall apart if hkjc change their site layout.
This is a lot of work. For a PHP expert with experience in this kind of thing, I would guess it would take about 2 months working fulltime to develop it properly.
For an experienced PHP person who is new to url, page and cookie manipulation, I would estimate 3 months fulltime work.
For someone just starting out in PHP, I would not be surprised if it wasn't done after 6 months.
If you have a lot of time to devote to this, you have chosen a very interesting project and you will learn a lot. 🙂 I just need you to understand that it's not one of those cases where someone can just give you six lines of code to paste into your script to make it all work. As you get further into the development you will be able to ask more specific questions like:
"Here is the code I am using to set this cookie to this value, but it's giving me this error, what's the problem?"
or
"I have this line of html from a page I am trying to parse, I want to change this value to this value, I'm using this regular expression syntax to do it, but I'm getting this result instead of what I expect, what am I doing wrong?"
And when you get to that stage, you will find that your understanding of the problem is so much clearer, and you will find that you get much more specific answers from the good people here at PHPbuilder.