Php Script For Extracting Data From Webpage

I need a PHP script:
Input: $_GET[‘stockname’] (for example, bcv)
Then, this script scraps the webpage:
http://finance.yahoo.com/q/pr?s=bcv
and extract the following data from the webpage:

INDEX Company Address1 Address 2 Address 3 City State Zip Country Tel Fax Web Sector Industry Full Time Employees Name-Age Name Age Title Pay Exercised Pay-Numeric BCV Bancroft Fund Ltd. 65 Madison Avenue Suite 550 Morristown NJ 07960-7308 United States 973-631-1177 973-631-1313 http://www.bancroftfund.com Sector:Financial Industry:Closed-End Fund – Debt Full Time Employees:NaN Mr. Thomas Hall Dinsmore CFA, 54 Mr. Thomas Hall Dinsmore CF 54 Chairman, Chief Exec. Officer, Sr. Portfolio Mang. and Member of Pricing Committee $0 N/A
Put the results into an array and then print_r($resultArray)

Leave a Reply

Your email address will not be published. Required fields are marked *