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 an PHP file on the webserver [modified]

executing an PHP file on the webserver [modified]

Scheduled Pinned Locked Moved C#
questioncsharpphpsysadmin
3 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! how can i do this?:confused: thanks asamay -- modified at 21:08 Monday 9th 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! how can i do this?:confused: thanks asamay -- modified at 21:08 Monday 9th October, 2006

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

      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

      A 1 Reply Last reply
      0
      • M mikone

        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

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

        thank you mik, i will look at webclient class in google!! asamay

        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