Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Experts,
I am just want to download file from the server using http from php server.
and my client is on c# windows application.

WebClient wc = new WebClient();
wc.DownloadFile("http://#####.co.in/anonymous/direc.php", "direc.php");

but i am getting a blank file in my execution folder
Any suggestion?
Posted

1 solution

Sure, this is pretty easy thing. You can use different class, System.Net.FtpWebRequest:
https://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest%28v=vs.110%29.aspx[^].

—SA
 
Share this answer
 
Comments
Aditya Chauhan 8-Jun-15 5:05am    
Y i know mr Kryukov
but when i download any .php extention file from the server this download without data
Sergey Alexandrovich Kryukov 8-Jun-15 11:23am    
You never mentioned you used FtpWebRequest. If you did and failed, you should have shown you code.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900