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. How to get data from PHP into C# Windows Application? [modified]

How to get data from PHP into C# Windows Application? [modified]

Scheduled Pinned Locked Moved C#
csharpphpasp-nettutorialquestion
7 Posts 5 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.
  • K Offline
    K Offline
    Khoramdin
    wrote on last edited by
    #1

    Hello everyone, I have a PHP file which is holding some data which I would like to enter into an Windows Application written in C#. I have no clue what so ever and I have no idea where to start. Could you be kind enough to tell me how this can be done and where I need to start? I am not sure if this is even possible to be honest with you. Maybe I cannot use PHP and should get ASP.NET for this?!!! Anyways, I welcome any suggestion. Thank you very much and have a great day. Khoramdin -- modified at 22:05 Monday 19th March, 2007

    V D C 3 Replies Last reply
    0
    • K Khoramdin

      Hello everyone, I have a PHP file which is holding some data which I would like to enter into an Windows Application written in C#. I have no clue what so ever and I have no idea where to start. Could you be kind enough to tell me how this can be done and where I need to start? I am not sure if this is even possible to be honest with you. Maybe I cannot use PHP and should get ASP.NET for this?!!! Anyways, I welcome any suggestion. Thank you very much and have a great day. Khoramdin -- modified at 22:05 Monday 19th March, 2007

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      How about a Webservice?

      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

      K 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        How about a Webservice?

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        K Offline
        K Offline
        Khoramdin
        wrote on last edited by
        #3

        Hello Kumar, I am not sure what you mean by "a Web-service". Could you be more specific, please? Thank you so much for the input, mate. Khoramdin

        1 Reply Last reply
        0
        • K Khoramdin

          Hello everyone, I have a PHP file which is holding some data which I would like to enter into an Windows Application written in C#. I have no clue what so ever and I have no idea where to start. Could you be kind enough to tell me how this can be done and where I need to start? I am not sure if this is even possible to be honest with you. Maybe I cannot use PHP and should get ASP.NET for this?!!! Anyways, I welcome any suggestion. Thank you very much and have a great day. Khoramdin -- modified at 22:05 Monday 19th March, 2007

          D Offline
          D Offline
          dsl fahk
          wrote on last edited by
          #4

          I'm not quite sure if I understand. Do you want to take the PHP file and put into a datagrid? Or do you just want to display it as a website? (I don't know what a PHP file is) To open it you can do this.... Filestream file = new Filestream(YourPHP.PHP); StreamReader sr = new StreamReader(file); string s = sr.ReadToEnd(); //Here is where you actually do stuff with your file (put in datagrid?) sr.close(); file.close(); But you don't do that if you just want to display it in a WebBrowser. Hope this helps, but if not, let me know. :)

          1 Reply Last reply
          0
          • K Khoramdin

            Hello everyone, I have a PHP file which is holding some data which I would like to enter into an Windows Application written in C#. I have no clue what so ever and I have no idea where to start. Could you be kind enough to tell me how this can be done and where I need to start? I am not sure if this is even possible to be honest with you. Maybe I cannot use PHP and should get ASP.NET for this?!!! Anyways, I welcome any suggestion. Thank you very much and have a great day. Khoramdin -- modified at 22:05 Monday 19th March, 2007

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            You can put a webbrowser control into your site and just point the URL to your PHP site. A web service is a program that passes data over the web, not through pages, but as XML. Google will tell you more.

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            K 1 Reply Last reply
            0
            • C Christian Graus

              You can put a webbrowser control into your site and just point the URL to your PHP site. A web service is a program that passes data over the web, not through pages, but as XML. Google will tell you more.

              Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              K Offline
              K Offline
              Khoramdin
              wrote on last edited by
              #6

              Hello Christian, Thanx for the reply. That is exactly what I am doing as I placed a webbrowser control in the Windows Application which is pointing to my php file. Now I have the executed php file displayed in the webbrowser control, containing the information "data" that I need to have available in the Windows Application as variables. How on earth I can get the displayed data into the Windows Application and use those variables in the C# programing? Thank you very much for your help. Khoramdin

              J 1 Reply Last reply
              0
              • K Khoramdin

                Hello Christian, Thanx for the reply. That is exactly what I am doing as I placed a webbrowser control in the Windows Application which is pointing to my php file. Now I have the executed php file displayed in the webbrowser control, containing the information "data" that I need to have available in the Windows Application as variables. How on earth I can get the displayed data into the Windows Application and use those variables in the C# programing? Thank you very much for your help. Khoramdin

                J Offline
                J Offline
                joon vh
                wrote on last edited by
                #7

                This discussion will have many interesting links for you: Read Web Page .NET C#[^]


                Visual Studio can't evaluate this, can you? public object moo { __get { return moo; } __set { moo = value; } }

                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