Thread: Reading output generated by php in C

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    28

    Smile Reading output generated by php in C

    Hi Guys, I am firing http request from browser and this will run PHP script at server,thus I get output on the web page.I need to read this output in my C program without any html tags.So Please tell me how to do this.

    Suppose the output generated on web page by script is like this:
    Code:
                  /usrname/home/abc.txt,ABC,123
                 /usrname/home/xyz.tx,XYZ,456
    Thank You,
    Nitin

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    and what is exactly the problem?
    read it with fgets and then parse using some of the methods available.
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    28
    Vart ,I want to fire a URL link from my C program and want to read out this output .I dont want to save this html page and then open it for reading .
    I want to fire the URL which is going to run a PHP script on server and this script generates the output html format. So I want to read this output through C.
    Do you have any sample example to read the html content generated by a php script.?

  4. #4
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    It would likely be like reading from any other kind of file. Plus, I'm positive this question has been answered on the boards already.
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 07:27 AM
  2. Replies: 22
    Last Post: 12-23-2008, 01:53 PM
  3. Replies: 2
    Last Post: 01-28-2008, 03:07 AM
  4. Connecting input iterator to output iterator
    By QuestionC in forum C++ Programming
    Replies: 2
    Last Post: 04-10-2007, 02:18 AM
  5. i want my output to be generated
    By coolshyam in forum C Programming
    Replies: 3
    Last Post: 03-19-2005, 12:53 AM