flamerail Posted April 21, 2006 Share Posted April 21, 2006 Im building a file mirror setup on my server.The logic is this,query for files, pictures, links ect like this.[a href=\"http://flamerail.com/workaround.php?url=http://google.com/google.jpg\" target=\"_blank\"]http://flamerail.com/workaround.php?url=ht....com/google.jpg[/a]Using any thing after the url to be downloaded server side then sent to the client.How would i do this? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/8084-how-to-build-a-url-redirect-that-loads-the-file-and-sends-it/ Share on other sites More sharing options...
gizmola Posted April 21, 2006 Share Posted April 21, 2006 You're going to have to do a better job explaining what it is you want to do and why. Quote Link to comment https://forums.phpfreaks.com/topic/8084-how-to-build-a-url-redirect-that-loads-the-file-and-sends-it/#findComment-29478 Share on other sites More sharing options...
flamerail Posted April 22, 2006 Author Share Posted April 22, 2006 [!--quoteo(post=367342:date=Apr 21 2006, 06:20 PM:name=gizmola)--][div class=\'quotetop\']QUOTE(gizmola @ Apr 21 2006, 06:20 PM) [snapback]367342[/snapback][/div][div class=\'quotemain\'][!--quotec--]You're going to have to do a better job explaining what it is you want to do and why.[/quote]Im making a work around so i can view blocked pages at school. :) Quote Link to comment https://forums.phpfreaks.com/topic/8084-how-to-build-a-url-redirect-that-loads-the-file-and-sends-it/#findComment-29645 Share on other sites More sharing options...
superpimp Posted April 22, 2006 Share Posted April 22, 2006 [code]<?php$url_to_open="http://www.google.com";$file=file_get_contents($url_to_open);echo $file;?>[/code]this should do. No pictures/files/movies/... will be shown if the admin of the site links to them as images/image.jpg instead of [a href=\"http://site.com/images/image.jpg\" target=\"_blank\"]http://site.com/images/image.jpg[/a] in the last case, pictures WILL be shown :)Have fun at school ;) Quote Link to comment https://forums.phpfreaks.com/topic/8084-how-to-build-a-url-redirect-that-loads-the-file-and-sends-it/#findComment-29650 Share on other sites More sharing options...
flamerail Posted April 25, 2006 Author Share Posted April 25, 2006 [!--quoteo(post=367516:date=Apr 22 2006, 04:18 PM:name=superpimp)--][div class=\'quotetop\']QUOTE(superpimp @ Apr 22 2006, 04:18 PM) [snapback]367516[/snapback][/div][div class=\'quotemain\'][!--quotec--][code]<?php$url_to_open="http://www.google.com";$file=file_get_contents($url_to_open);echo $file;?>[/code]this should do. No pictures/files/movies/... will be shown if the admin of the site links to them as images/image.jpg instead of [a href=\"http://site.com/images/image.jpg\" target=\"_blank\"]http://site.com/images/image.jpg[/a] in the last case, pictures WILL be shown :)Have fun at school ;)[/quote]Ok that works. But I need to take and load the image to the server then send it to the client... like a hub between me and the site. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/8084-how-to-build-a-url-redirect-that-loads-the-file-and-sends-it/#findComment-30364 Share on other sites More sharing options...
gizmola Posted July 24, 2009 Share Posted July 24, 2009 This could be written, but you could also simply install squid on your external server and use that as a proxy server. Quote Link to comment https://forums.phpfreaks.com/topic/8084-how-to-build-a-url-redirect-that-loads-the-file-and-sends-it/#findComment-882385 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.