How to download XML content generated by PHP script using WebClient?

vedukulring

New Member
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 \[code\]header("Content-type: text/xml")\[/code\] and the webclient tries to download from \[code\]https://mySecureServer.com/db/getXMLData.php\[/code\] (Maybe that's the problem).Any ideas?EDIT: WebClient Code (just ripped some local file operations):\[code\]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);\[/code\]
 
Back
Top