FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


simple proxy





linexpert
Hi
My site contains games and my friends can't access it in school. Let's say my site address is abcd.frih.net and when kinds go to abcd.someotherhost.com i want there to be a mirror that shows what's on abcd.frih.net

I know you can use iFrames but what happens is that when people go to abcd.someotherhost.com the site shows up but the iframe content is blocked.

Can someone please help?

thanks
SlowWalkere
I'm not sure if this will work, because I haven't tested it behind a proxy, but I think it might...

The problem with using frames is that the browser still directly accesses the banned website. Hence it is unable to view it.

If on the accepted server you write an index.php file that contains one line - "readfile("bannedsite.com/index.php")" it might show the page.

Readfile takes a filename/URL, reads it all on the server side, and then spews out the contents. Since the server finds the banned page and converts it to html as part of the php script, it might do what you're looking for.

However, you're going to have to do some work to make everything work properly. First, all of your relative links on the page (img, href, etc) won't work. They will resolve to a local-link on the accepted server, instead of the banned server. You can fix the images by using a complete URL as a reference, but then they will probably get blocked by the browser, so I'm not sure if you can get them working properly. For the links, you can make a copy of each page on the new server containing the same "readfile" line. That way each link should resolve to a local file that simply reads and prints out the remote file.

It's not perfect, but it's the only thing I can think of.

Good luck,
- Walkere
Philip
try this code

Code:
$filename = "http://www.google.com";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);


i dunnot it work or not also Embarassed
i hope it work. Smile
Related topics
Internet Download Manager
Simple or Bulky/Heavy ?
web proxy
751 Useful Windows XP Files
Simple PHP Navigation
Mail with PHP (Simple Tutorial)
Google's Secret Revealed
The best download manager
the simple guestbook
A Simple Form Mail in PHP
INCREDIBLE THINGS HAPPEN IN AMERICA... In a simple 20$ bill
Gilmore Girls
Proxy Ports..
proxy software...
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.