Results 1 to 1 of 1

Thread: Read the source page of url? SOLVED

  1. #1
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Read the source page of url? SOLVED

    QT3 code
    Qt Code:
    1. QUrl url( "http://somethindrx/somethingxdf.cgi?txtYear=2008&txtMonth=09&txtDay=18" );
    2.  
    3. http->setHost(url.host(),url.port() != -1 ? url.port() : 80);
    4.  
    5. http->get(url.path() +[B]"?txtYear=2008&txtMonth=09&txtDay=18"[/B],file);
    6.  
    7. //the result is like
    8. /*
    9. <recordset>
    10. <month_of_year>9</month_of_year>
    11. <day_of_month>18</day_of_month>
    12. <hour_of_day>14</hour_of_day>
    13. <min_of_hour>43</min_of_hour>
    14. </recordset>
    15. */
    To copy to clipboard, switch view to plain text mode 

    after using qhttp it works..

    it became complicated because of the .cgi that i was accessing is more like an executable which is requiring parameter, after adding the arguments url.path()+"?(argu)"
    I finally get it..

    thanks..
    Last edited by triperzonak; 19th September 2008 at 11:24.

Similar Threads

  1. External Lib read from QBuffer on Calback problem
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 2nd June 2008, 19:43
  2. How to read CD with read?
    By vishal.chauhan in forum Qt Programming
    Replies: 6
    Last Post: 29th June 2007, 08:20
  3. QIODevice read()
    By ShaChris23 in forum Newbie
    Replies: 1
    Last Post: 3rd May 2007, 00:29
  4. QWidget display on 2 stack widget page
    By spawnwj in forum Qt Programming
    Replies: 3
    Last Post: 4th September 2006, 12:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.