Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. executing a PHP file on the webserver [modified]

executing a PHP file on the webserver [modified]

Scheduled Pinned Locked Moved C#
csharpquestionphpmysqlsysadmin
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    asamay
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • A asamay

      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

      M Offline
      M Offline
      mikone
      wrote on last edited by
      #2

      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..)

      A 1 Reply Last reply
      0
      • M mikone

        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..)

        A Offline
        A Offline
        asamay
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • A 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

          M Offline
          M Offline
          mikone
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • M mikone

            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

            A Offline
            A Offline
            asamay
            wrote on last edited by
            #5

            i told u, maybe there is a another way to do!! i really looked at the net before u reply the first message! :) i read your 1st message about 2 hours ago before i replied. anyway, thanks again for your advice! ;)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups