Jump to content
xisto Community
Sign in to follow this  
saxsux

Getting Files From Other Sites Using wget

Recommended Posts

Hello. A while ago, a friend showed me this PHP code (wget) which allows you to get files from other sites. I was a simple one liner type thing.Since my old host (Nytka) went down, I've lost it, as has my friend.Do you know anything about wget, and could tell me it?

Share this post


Link to post
Share on other sites

I think he means how to have a php file download another file

I think you should use the system() command. (more info on http://php.net/)

It works like this

<?php
$foo = system('wget http://forums.xisto.com/no_longer_exists/ ~',$output);
?>

If i'm correct (im too lazy to test it atm, it will download a file file.exe from asdf.com and give back the console messages to the variable $output.

I hope this is what you're asking for

Share this post


Link to post
Share on other sites

I think he means how to have a php file download another file

 

I think you should use the system() command. (more info on http://php.net/)

 

It works like this

 

<?php

$foo = system('wget http://forums.xisto.com/no_longer_exists/ ~',$output);

?>

 

If i'm correct (im too lazy to test it atm, it will download a file file.exe from asdf.com and give back the console messages to the variable $output.

 

I hope this is what you're asking for

<{POST_SNAPBACK}>

That's the one! It works brilliantly!

Thank You!

:P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.