Hello,
I have a PHP script which generates a XML using 'echo' commands and data from a database. So, if I access this script from a browser, I can see the xml data and download it.
So I writting a software to retrieve this data using webclient class. But webclient only downloads a empty file, so I'm thinking it's trying to download the .php file, and not the dynamic content generated.
The PHP script is sending a header("Content-type: text/xml")
and the webclient tries to download from https://mySecureServer.com/db/getXMLData.php
(Maybe that's the problem).
Any ideas?
EDIT: WebClient Code (just ripped some local file operations):
string url = @"https://mySecureServer.com/db/getXMLData.php";
WebClient client = new WebClient();
client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadFileCompletedEvtHdl);
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressChangedEvtHdl);
client.BaseAddress = @"https://mySecureServer.com/db/";
client.DownloadFileAsync(new Uri(url), toSavePath + filename);