executing a 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! beacuse MySQL server port is closed for remote login. how can i do this? maybe System.Net.WebClient class could be useful? :confused: thanks asamay -- modified at 13:01 Tuesday 10th October, 2006
-
hi. i wanna execute a PHP file on a remote server in C# and retreive some data from that PHP file! beacuse MySQL server port is closed for remote login. how can i do this? maybe System.Net.WebClient class could be useful? :confused: thanks asamay -- modified at 13:01 Tuesday 10th October, 2006
ok you did not google for it as i suggested you to do :) WebClient myclient = new WebClient(); FileStream mystream = myclient.OpenRead("http://yourwebpage.net"); while (mystream.Peek() > -1) { string line = mystream.ReadLine(); } i guess/hope this code retrieves the data of the specified page and reads it line by line until end of file. please try to google for it the next time because there are so many existing pages and explanations about it... i know you even did not try to find something useful about it and thats kinda annoying and makes me not respond to posts like this - thats why if you expect anyone to answer you should follow their advises (or at least try to and tell them why you failed..)
-
ok you did not google for it as i suggested you to do :) WebClient myclient = new WebClient(); FileStream mystream = myclient.OpenRead("http://yourwebpage.net"); while (mystream.Peek() > -1) { string line = mystream.ReadLine(); } i guess/hope this code retrieves the data of the specified page and reads it line by line until end of file. please try to google for it the next time because there are so many existing pages and explanations about it... i know you even did not try to find something useful about it and thats kinda annoying and makes me not respond to posts like this - thats why if you expect anyone to answer you should follow their advises (or at least try to and tell them why you failed..)
thank you again Mikone, i have replied. i think u didn't see :) your suggest was very helpful for me, i tried to find something in google, but i just wanted to ask again, maybe somebody knows another method for to do that. also im new on C#. there are lots of documents about it and i really didn't know where to start. but now it looks easy. thank you again!!:rose: asamay
-
thank you again Mikone, i have replied. i think u didn't see :) your suggest was very helpful for me, i tried to find something in google, but i just wanted to ask again, maybe somebody knows another method for to do that. also im new on C#. there are lots of documents about it and i really didn't know where to start. but now it looks easy. thank you again!!:rose: asamay
i read the reply and you wrote "i will search for.." but 10 minutes later you already posted the same question again that's why i thought you weren't really searching ;) next time try to search for terms like: - "system.net.webclient msdn" (first and third hit) - "system.net.webclient tutorial" (second hit) if you get no results when searching for these terms you could search for "webclient msdn/tutorial" or whatever. In generally the .net classes are well documented and they often provide examples. if you cant find anything in google search for articles or posts in the messageboard - often people asked the same question and there already exists an answer right next to you ;) keep on learning (as everyone should ;)) - all this stuff will become less complicated!! Good luck, mik
-
i read the reply and you wrote "i will search for.." but 10 minutes later you already posted the same question again that's why i thought you weren't really searching ;) next time try to search for terms like: - "system.net.webclient msdn" (first and third hit) - "system.net.webclient tutorial" (second hit) if you get no results when searching for these terms you could search for "webclient msdn/tutorial" or whatever. In generally the .net classes are well documented and they often provide examples. if you cant find anything in google search for articles or posts in the messageboard - often people asked the same question and there already exists an answer right next to you ;) keep on learning (as everyone should ;)) - all this stuff will become less complicated!! Good luck, mik