Kapalı

download file from url in php

I want to download file from url in php.

I have a few example codes but it is not working.

Please bid if you can do it.

function grab_image($url,$saveto){

/*

$contentOrFalseOnFailure = file_get_contents($url);

if(!$contentOrFalseOnFailure){

return array("status" => "error", "msg" => "file_get_contents failed from ".$filerul);

}

$byteCountOrFalseOnFailure = file_put_contents($saveto, $contentOrFalseOnFailure);

if(!$byteCountOrFalseOnFailure){

return array("status" => "error", "msg" => "file_put_contents failed ");

}

*/

/*

$ch = curl_init($url);

if(!$ch){

return false;

}

$fp = fopen($saveto, 'wb');

curl_setopt($ch, CURLOPT_FILE, $fp);

//curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_HEADER, 0);

$resp = curl_exec($ch);

curl_close($ch);

fclose($fp);

if(!$resp){

return false;

}

*/

/*

$ch = curl_init ($url);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);

$rawdata=curl_exec($ch);

curl_close ($ch);

if(file_exists($saveto)){

unlink($saveto);

}

$fp = fopen($saveto,'x');

fwrite($fp, $rawdata);

fclose($fp);

*/

$curlCh = curl_init();

curl_setopt($curlCh, CURLOPT_URL, $url);

curl_setopt($curlCh, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curlCh, CURLOPT_SSLVERSION,3);

$curlData = curl_exec ($curlCh);

curl_close ($curlCh);

$file = fopen($saveto, "w+");

fputs($file, $curlData);

fclose($file);

return true;

}

Here are url examples:

[login to view URL]

[login to view URL]

Beceriler: PHP

Daha fazlasını gör: php download file from url to client, php download file script, php download image from url, php get file from another server, php download file from url to computer, php code for downloading a file from server, php download file from server to local, php download file from url curl, audio file upload php project download, save url php file, download file url wmv, download file url winapi, user file download record mysql php, file upload php script download, download file url objective

İşveren Hakkında:
( 14 değerlendirme ) KINGS LANGLEY, Australia

Proje NO: #15179282

Bu iş için 26 freelancer ortalamada $18 teklif veriyor

SierraSoft

I have gone through your project requirement and would like to discuss further on it. Please send me personal message for more clarification. Relevant Skills and Experience I am Rahul Parmar, with more than 9 years of Daha Fazla

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(40 Değerlendirme)
7.0
imagicaworld

Hello client Relevant Skills and Experience i have read your requirement and i can do this job. Proposed Milestones $15 AUD - D

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(62 Değerlendirme)
6.1
elbruninh

hi, i can do it Relevant Skills and Experience PHP Proposed Milestones $30 AUD - project

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(72 Değerlendirme)
6.2
in %bids___i_period_sub_35% gün içinde40%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(57 Değerlendirme)
5.8
sadgurusoft

Hello sir, I am ready to do this task based on your requirement. Relevant Skills and Experience I am currently working with PHP, wordpress,Codeigniter,OSCommerce,cre loaded, CMS,PSD to HTML and I have 3+ year of exper Daha Fazla

in %bids___i_period_sub_35% gün içinde20%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(125 Değerlendirme)
5.6
insystemgrp

I have good knowledge of php. I able to do this download file from file path task very well with good quality. our main motto is client satisfaction and make a long term relationship with you. Thank you

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(57 Değerlendirme)
5.5
Alian123soleil

Hi ! I'm interested in your project. I can quickly help you to fix your script. Relevant Skills and Experience 20 years of experience around Linux development. With PHP of course Proposed Milestones $10 AUD - fix you Daha Fazla

in %bids___i_period_sub_35% gün içinde10%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(18 Değerlendirme)
5.0
nvbishr

Pls send me details. Stay tuned, I'm still working on this proposal.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(28 Değerlendirme)
5.2
GetMeHire

Hi There, I can help with the modification of download file code. Relevant Skills and Experience Please initiate chat and let's get started. Looking forward working with you. Proposed Milestones $50 AUD - 100% work Daha Fazla

in %bids___i_period_sub_35% gün içinde50%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(34 Değerlendirme)
5.3
lidopih

Hello, I can make the download to work. Would you like to save to picture to your server or not? Relevant Skills and Experience I have 6 years of experience as web developer. I can do this on my server to test it and Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(20 Değerlendirme)
4.8
umairmalik10

Hi, I can do this task of downloading sample file. I have done this type of work to download images from urls before so I can built this script too. Relevant Skills and Experience I've 4 years of development experienc Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(32 Değerlendirme)
4.7
helpyourjob

Hi, My portfolio - [login to view URL] Completed works:- [login to view URL] [login to view URL] [login to view URL] [login to view URL] Relevant Skills a Daha Fazla

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(14 Değerlendirme)
4.9
in %bids___i_period_sub_35% gün içinde17%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(4 Değerlendirme)
4.4
love0207

Hi dear I am a senior web developer I can fix this issue Relevant Skills and Experience I ’m an expert web developer with more than 7 years experiences of both NG/react.js/vuejs/jquery/jqwidget/materialUI/metronicUI Daha Fazla

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(10 Değerlendirme)
4.0
GlobalSite2

Hi I have done this many times before, to transfer big files from server to server without downloading to pc. but your links should not have redirects. Relevant Skills and Experience I have 4+ years of experience in w Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(13 Değerlendirme)
3.9
freedomindia

Sir i will done your job in 30 minutes so I am best for you...

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(9 Değerlendirme)
2.9
ByteWalkers

FIle download using php is quite easy for us. We are a team with 7 years of experience in software and web development. Let's chat. Relevant Skills and Experience 7 years Proposed Milestones $15 AUD - 1

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(4 Değerlendirme)
2.0
rishianand001

A proposal has not yet been provided

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(1 Yorum)
0.4
aasharib

A proposal has not yet been provided

in %bids___i_period_sub_35% gün içinde10%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)
0.0
1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% AUD
(0 Değerlendirme)
0.0