Jump to content

Archived

This topic is now archived and is closed to further replies.

flamerail

How to build a url redirect that loads the file and sends it.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
You're going to have to do a better job explaining what it is you want to do and why.

Share this post


Link to post
Share on other sites
[!--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. :)

Share this post


Link to post
Share on other sites
[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 ;)

Share this post


Link to post
Share on other sites
[!--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?

Share this post


Link to post
Share on other sites
This could be written, but you could also simply install squid on your external server and use that as a proxy server.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.