executing an PHP file on the webserver [modified]
-
hi. i wanna execute a PHP file on a remote server in C# and retreive some data from that PHP file! how can i do this?:confused: thanks asamay -- modified at 21:08 Monday 9th October, 2006
Hi, i haven't done anything similiar before but i'm sure you can do this with the System.Net.WebClient class. It provides methods like DownloadFile and ReadFile if i remember right. Executing a PHP file isn't anything else than doing a webrequest. You will never see the php script code on a page (unless php does not work properly) - those scripts will be preprocessed. that means it generates an output which will be send to the one who did the request. Hence you just have to "behave" like an internet browser and ask for the files. Since i don't know how to use the webclient class i would suggest you to use google and learn something about it - i'm sure it's the solution for your problem :) Good luck, mik
-
Hi, i haven't done anything similiar before but i'm sure you can do this with the System.Net.WebClient class. It provides methods like DownloadFile and ReadFile if i remember right. Executing a PHP file isn't anything else than doing a webrequest. You will never see the php script code on a page (unless php does not work properly) - those scripts will be preprocessed. that means it generates an output which will be send to the one who did the request. Hence you just have to "behave" like an internet browser and ask for the files. Since i don't know how to use the webclient class i would suggest you to use google and learn something about it - i'm sure it's the solution for your problem :) Good luck, mik