Jump to content


Photo

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


  • Please log in to reply
5 replies to this topic

#1 flamerail

flamerail
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 21 April 2006 - 09:11 PM

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!

#2 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,664 posts
  • LocationLos Angeles, CA USA

Posted 21 April 2006 - 10:20 PM

You're going to have to do a better job explaining what it is you want to do and why.

#3 flamerail

flamerail
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 22 April 2006 - 07:39 PM

[!--quoteo(post=367342:date=Apr 21 2006, 06:20 PM:name=gizmola)--][div class=\'quotetop\']QUOTE(gizmola @ Apr 21 2006, 06:20 PM) View Post[/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. :)

#4 superpimp

superpimp
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 22 April 2006 - 08:18 PM

<?php
$url_to_open="http://www.google.com";
$file=file_get_contents($url_to_open);
echo $file;
?>

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 ;)

#5 flamerail

flamerail
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 25 April 2006 - 01:21 AM

[!--quoteo(post=367516:date=Apr 22 2006, 04:18 PM:name=superpimp)--][div class=\'quotetop\']QUOTE(superpimp @ Apr 22 2006, 04:18 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
<?php
$url_to_open="http://www.google.com";
$file=file_get_contents($url_to_open);
echo $file;
?>

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?

#6 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,664 posts
  • LocationLos Angeles, CA USA

Posted 24 July 2009 - 11:23 PM

This could be written, but you could also simply install squid on your external server and use that as a proxy server.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users