Data extraction from file

This is a discussion on Data extraction from file within the C++ Programming forums, part of the General Programming Boards category; Hey guys, Great community you have here. I really need to get this thing working to save me alot of ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    2

    Question Data extraction from file

    Hey guys,

    Great community you have here.

    I really need to get this thing working to save me alot of time,

    Basically im making a program that logs into my website control pannel, and downloads a bandwidth report of a specific domain. the report downloaded is a html file. I am only interested in the number of MB used:

    Code:
    <P><B>Results</B><BR>
    <TABLE WIDTH=100% CELLSPACING=1 cELLPADDING=0><TR><TD COLSPAN="[0]"><DIV CLASS=m><A HREF="http://control.***.com:6998/cp4.exe?BWMACTION=1&startdate=10-09-2003&enddate=10-10-2003&ID=508328">domain.com</A></TD></DIV><TD COLSPAN="[0]"><DIV CLASS=m>    2.04 MB</TD></DIV></TR></TABLE></font>
    </P>
    As shown above what i need is the 2.04 MB extracted from the .html file and placing in a varible.

    If anyone can show me an example of how i can do this, including opening the file for editing as i am not sure of the correct way of doing this.

    N.B there is alot of other not needed code in the html file.

    Thanks very much,
    Peter

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Do you know how to use sockets?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    2
    yes i have used sockets to download the file, i now have c:\bandwidth.html

    which needs openeing in the my program and the single size in MB extracting to a varible.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. Editing a data file
    By Strait in forum C++ Programming
    Replies: 7
    Last Post: 02-05-2005, 03:21 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. File Database & Data Structure :: C++
    By kuphryn in forum C++ Programming
    Replies: 0
    Last Post: 02-24-2002, 10:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21