Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
remote download php like rapidshare remote upload
Old 08-04-2010, 01:12 PM remote download php like rapidshare remote upload
Novice Talker

Posts: 10
Name: Muhammad Umer Farooq
Trades: 0
hi.. i am really stuck in making remote download script in which user can put a remote file url and it will transfer file from remote server to my server. please please some one help... i really want to make like rapidshare.com remote upload.. means if the browser is closed, downloading will not effect.. any help?? i just totally like to make like rapishare.com remote upload.. please please someone help.. i got headache in making this
omerfarooq123 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-04-2010, 01:32 PM Re: remote download php like rapidshare remote upload
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Not with PHP scripting.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-04-2010, 02:48 PM Re: remote download php like rapidshare remote upload
Novice Talker

Posts: 10
Name: Muhammad Umer Farooq
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Not with PHP scripting.
it is all about php i have the following code to download remote file but not working.. can u tell me where is the problm.. code doesnt give me any error just not downloading files

PHP Code:
<?php
 
if (isset($_POST['links']))
{
    
$links explode("\n"$_POST['links']);
       
chdir('files');
       foreach (
$links as $link){
        
$link escapeshellarg(trim($link));
               
shell_exec('wget ' $link '&> /dev/null &');
    }
       
chdir('..');}
 
?>
<form action="" method="post">
    <textarea name="links" rows="30" cols="60">Links go here</textarea>
    <br /> 
   <input type="submit" value="Upload" />
</form>

Last edited by chrishirst; 08-04-2010 at 04:04 PM..
omerfarooq123 is offline
Reply With Quote
View Public Profile
 
Old 08-04-2010, 04:16 PM Re: remote download php like rapidshare remote upload
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You will only get errors back if something fails during the browser communication.

HTTP is a disconnected protocol, which means the client sends a request, the server sends a response and communication is finished. There is no more communication until the client makes another request.

Any message output from wget is routed to nowhere (/dev/null ). What your PHP script does is to start a silent instance of wget, if that fails for any reason you will never know.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-04-2010, 04:59 PM Re: remote download php like rapidshare remote upload
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Wow thats an awesomely unsecure script there!

Also note that the wget will run as the user whos run it, In this case, Probably apache.

So unless apache has a user folder /home/apache/ then files may not be able to download as theres no where to put it.

Maybe add something to the wget to force files to got a directory..

Oh and DONT allow the downloads to goto your http directory..
They could upload a php file, then another shell script and call the php file that would then call the shell script using the same method you used to call wget...

You could leave the server wide open for a major hack.., Well i say could.. I mean you will.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE



Last edited by lynxus; 08-04-2010 at 05:01 PM..
lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 08-04-2010, 05:03 PM Re: remote download php like rapidshare remote upload
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
ONE thing you could possibly do is add the links to a database, Then have a perl script or shell script that executes every 1 minute through cron.

That script could look at the links, Verify they are safe file formats and download them every one minute, Marking downloaded ones as it goes along..
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 08-05-2010, 05:47 AM Re: remote download php like rapidshare remote upload
Novice Talker

Posts: 10
Name: Muhammad Umer Farooq
Trades: 0
Quote:
Originally Posted by lynxus View Post
ONE thing you could possibly do is add the links to a database, Then have a perl script or shell script that executes every 1 minute through cron.

That script could look at the links, Verify they are safe file formats and download them every one minute, Marking downloaded ones as it goes along..

i have add a url of a remote image in database then what will i do? can you help me in making a script?? currently i have no idea.. i can add a link in database and also call from the database but what next?
omerfarooq123 is offline
Reply With Quote
View Public Profile
 
Old 08-05-2010, 10:25 PM Re: remote download php like rapidshare remote upload
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
I'd think you could use an FTP connection to their computer, just ask them to enter their data, but it would have to be INCREDIBLY secure and I'm not even sure if that's possible...?
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to remote download php like rapidshare remote upload
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35415 seconds with 12 queries