943,703 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 891
  • PHP RSS
Dec 18th, 2008
0

Website to CSV

Expand Post »
Dear members,

I'm in serious problem. I need a tool which can get all content information of a website and at the end these information will produce a CSV. That CSV will be imported in another database...can anyone help me regarding this issue..
Similar Threads
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
nil_gh_80 is offline Offline
64 posts
since Aug 2007
Dec 18th, 2008
0

Re: Website to CSV

come on man some one plzzzzzzz rply
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
nil_gh_80 is offline Offline
64 posts
since Aug 2007
Dec 27th, 2008
0

Re: Website to CSV

Click to Expand / Collapse  Quote originally posted by nil_gh_80 ...
I need a tool which can get all content information of a website and at the end these information will produce a CSV. That CSV will be imported in another database...can anyone help me regarding this issue..
Can't you just use phpMyAdmin? It will export as csv, but why csv over sql? Are you just moving the site?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gotmick is offline Offline
8 posts
since Aug 2007
Dec 27th, 2008
0

Re: Website to CSV

I've used something like this:

PHP Syntax (Toggle Plain Text)
  1. ini_set ('display_errors', 1);
  2. error_reporting (E_ALL & ~ E_NOTICE);
  3.  
  4. ##################################################################
  5.  
  6. $csv_output = "Last Name,First Name,Address 1,Address 2,City,State,Zip,Phone,Email,DOB,Member";
  7. $csv_output .= "\n";
  8. $result = mysql_query("SELECT * FROM members");
  9.  
  10. while($row = mysql_fetch_array($result)) {
  11. $csv_output .= "$row[last_name],$row[first_name],$row[address1],$row[address2],$row[city],$row[state],$row[zip],$row[phone],$row[email],$row[age],$row[member]\n";
  12. }
  13.  
  14. header("Content-type: application/vnd.ms-excel");
  15. header("Content-disposition: attachment; filename=" . date("Y-m-d").".xls");
  16. print $csv_output;
  17. exit;

I hope this helps.
Reputation Points: 16
Solved Threads: 1
Light Poster
joshmac is offline Offline
29 posts
since Apr 2008
Jan 4th, 2009
0

Re: Website to CSV

Click to Expand / Collapse  Quote originally posted by nil_gh_80 ...
Dear members,

I'm in serious problem. I need a tool which can get all content information of a website and at the end these information will produce a CSV. That CSV will be imported in another database...can anyone help me regarding this issue..
Hi: I have had great success building scripts over the last several years that convert websites to csv and other formats. A previous project mined data from over 300,000 pages. I would need more information to be sure I can help you, as much depends on the structure of the data on the original site. Please contact me if you would like to discuss this further.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
toolsmith is offline Offline
1 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: urgent help...
Next Thread in PHP Forum Timeline: Multilanguage with PHP-MySQL





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC