Thread: Data extraction from file

  1. #1
    Registered User
    Join Date
    Oct 2003

    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:

    <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"></A></TD></DIV><TD COLSPAN="[0]"><DIV CLASS=m>    2.04 MB</TD></DIV></TR></TABLE></font>
    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,

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Ontario, Canada
    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
    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, 09: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, 04: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, 11:47 AM