majid_master Posted November 2, 2012 Share Posted November 2, 2012 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? Quote Link to comment https://forums.phpfreaks.com/topic/270190-url-upload/ Share on other sites More sharing options...
Muddy_Funster Posted November 2, 2012 Share Posted November 2, 2012 Use a curl() call -> See here Quote Link to comment https://forums.phpfreaks.com/topic/270190-url-upload/#findComment-1389550 Share on other sites More sharing options...
majid_master Posted November 2, 2012 Author Share Posted November 2, 2012 Use a curl() call -> See here sorry.....i am a beginer.....can u make it right?? Quote Link to comment https://forums.phpfreaks.com/topic/270190-url-upload/#findComment-1389560 Share on other sites More sharing options...
Muddy_Funster Posted November 2, 2012 Share Posted November 2, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/270190-url-upload/#findComment-1389562 Share on other sites More sharing options...
majid_master Posted November 2, 2012 Author Share Posted November 2, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/270190-url-upload/#findComment-1389567 Share on other sites More sharing options...
majid_master Posted November 2, 2012 Author Share Posted November 2, 2012 (edited) i want to send u a pm but u can't recieve a new massage fix this.....pm me..... thanx The member Muddy_Funster cannot receive any new messages do u have yahoo idi???? Edited November 2, 2012 by majid_master Quote Link to comment https://forums.phpfreaks.com/topic/270190-url-upload/#findComment-1389577 Share on other sites More sharing options...
Christian F. Posted November 2, 2012 Share Posted November 2, 2012 (edited) 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 November 2, 2012 by Christian F. Quote Link to comment https://forums.phpfreaks.com/topic/270190-url-upload/#findComment-1389599 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.