Jump to content

Url Upload


majid_master

Recommended Posts

hi

i want to upload a file to my server from a url

i searched and i found this code:

<?php

define('BUFSIZ', 4095);

$url = 'http://www.site.com/file.zip';

$rfile = fopen($url, 'r');

$lfile = fopen(basename($url), 'w');

while(!feof($rfile))

fwrite($lfile, fread($rfile, BUFSIZ), BUFSIZ);

fclose($rfile);

fclose($lfile);

?>

my problem is that the url is from a file sharing site that have user and password for download

how can i put user and pass to downalod in this code?

Link to comment
Share on other sites

I could, but then I would expect payment for that. I'll help you out if you want me to, but I don't do work for free.

 

First thing you need to establish is the form field names on the remote server that is asking for the login. you can do this by veiwing the page source of said site.

 

i want to send u a pm but u can't recieve a new massage

fix this.....pm me.....

thanx

Link to comment
Share on other sites

majid: Ever considered the fact that he does not wish to receive PMs from people, because he knows how much time it'll take and that it will not be of use to anyone else?

If you want help to fix your problem, the best thing you can do is to keep it in this thread. Not only will it help others with the same problem, but it will also allow for a lot more people to answer your questions. Ensuring that everyone wins, including you.

 

That said, I think you need to re-read his statement about not working for free. We do expect that you do most of the work on your own, and research your problems to the best of your ability, before asking for help. We're not your personal slaves, and we have a lot of things that we can (and probably should) do instead.

 

You wouldn't want to "help" me (for free) putting up a fence, while I was laying around getting a tan, would you?

 

PS: You might find this article very informative and useful.

Edited by Christian F.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.