Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Visit websites through my website???
Index -> Web Design
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Nathan4102




PostPosted: Fri May 31, 2013 6:15 pm   Post subject: Visit websites through my website???

I had this crazy idea of using my website to visit websites that are blocked at my school (Youtube, for example), is this even possible? I mean, there's proxy websites around, so am I able to turn my website (just one directory, not the entire thing) into a proxy site that allows me to get these sites? Or would it be possible to send my website an address, it downloads the website, and sends it to me (Avoiding direct contact with the target website)? I know this may be a tad malicious, but I don't think its too malicious to post here.

Thanks!
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Fri May 31, 2013 7:00 pm   Post subject: RE:Visit websites through my website???

Yes it is possible, but it's not a good idea if you leave it open to the public.

If you have control over the server and are using Apache, you could use something like mod_proxy or if you can only run PHP scripts you might be able to make something using fopen() to connect and get data from other sites (however this might be disabled by your hosting provider).

Some Googling also shows there are a few open source PHP projects that do something like this. For example http://sourceforge.net/projects/php-proxy/. This would very likely violate your hosts ToS tho.

It would be far easier to set up your own proxy or VPN then trying to make your own website based proxy.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Fri May 31, 2013 7:00 pm   Post subject: RE:Visit websites through my website???

yes, but it starts getting complicated when the websites contain more than simple text. Consider the YouTube example -- your website fetches the content and renders a page that looks like

Quote:

<html>
...
<video src="youtube.com/abc123" />
...
</html>


Now your website is trying to load resources from destinations that are blocked... There are also issues with http://en.wikipedia.org/wiki/Same_origin_policy

Though if you manage to proxy all of the requests, then yeah, it's possible.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Nathan4102




PostPosted: Fri May 31, 2013 7:31 pm   Post subject: RE:Visit websites through my website???

Good to know this is possible, sounds like it won't be easy though. Tony has a good point with that YouTube example, downloading the website doesn't sound like the most practical solution. I'd use a VPN, or something alike, but downloading/installing software is disallowed and strictly enforced. , I think I'll try the proxy approach, starting with Dan's link.

Thanks guys!
Jonathan29




PostPosted: Wed Oct 02, 2013 5:36 am   Post subject: RE:Visit websites through my website???

you can do this but i will recommend you to don't try this at school although everyone have their own opinion and i just shared mine opinion
Display posts from previous:   
   Index -> Web Design
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: