Page 1 of 1
Need to display a website page to user behind firewall
Posted: Thu Sep 30, 2004 7:46 pm
by voltrader
I have a friend who works behind a firewall that prevents viewing of almost every sports page.
Since Fantasy season is in full swing

he's desperately looking for a way to view stats on yahoo. He doesn't have to be logged-in.
What's the best way to do this?
I have a server which is not blocked by his firewall. What's the best way of capturing a certain page and displaying it again?
Posted: Thu Sep 30, 2004 8:00 pm
by John Cartwright
[php_man]file_get_contents[/php_man]
Posted: Thu Sep 30, 2004 8:18 pm
by feyd
Phen is partially right.. it involves [php_man]file_get_contents[/php_man](), but if there are any external streams needed from that server, they likely will be blocked too. So, it's a combination of [php_man]file_get_contents[/php_man]() (or my preferred for this, [php_man]curl[/php_man]) and some regular expression function calls ([php_man]preg_replace[/php_man]) to switch all the external file references in the page to usable ones. You're basically building a proxy, in a fashion.
Posted: Thu Sep 30, 2004 8:18 pm
by voltrader
it's a cheap server, and I believe fopen wrappers are disabled... any other method?
Posted: Thu Sep 30, 2004 8:19 pm
by voltrader
got it feyd... thanks. I'll experiment.
Argh. The popular anon proxies are also blocked by my mate's IT guys, so i'll have to build a rudimentary one myself.
I suppose I should change all the img src=... references as a start.
Posted: Thu Sep 30, 2004 8:31 pm
by feyd
href, src, action, background.. if you want to make a real good one, there's a lot to switch, but for the most part, those are all you need to fix..