0

Possible Duplicate:
How to scrape a javascript site using PHP, CURL

I have a webpage stored on server and I want to extract the data from that web page, which have class I want to extract using CURL in php.

How can I achieve that ?

Update: Mycode..

 $ch = curl_init() or die('cURL not available');
    curl_setopt($ch, CURLOPT_URL, 'xxxxxxxxxx.php');
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $options);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  //to suppress the curl output 
    $html = curl_exec($ch);
    curl_close($ch);

Solved

For the solution I have used Simple DOM PARSER PHP. Thanks to the people who helped.

Regards

Community
  • 1
  • 1
Murtaza Khursheed Hussain
  • 14,976
  • 7
  • 55
  • 82
  • You can find lots of tutorials on Google for this (e.g. http://davidwalsh.name/download-urls-content-php-curl). These questions should also help - http://stackoverflow.com/questions/959063/how-to-send-a-get-request-from-php, http://stackoverflow.com/questions/9342719/how-to-scrape-a-javascript-site-using-php-curl – Dan Blows Mar 26 '12 at 11:48
  • @MurtazaHussain I downvoted it, because it's a duplicate of lots of other questions on StackOverflow and the internet generally (see my comment above). There's no specific problem in your question which those other tutorials and answers do not cover. If there is, please update your question. – Dan Blows Mar 26 '12 at 12:08

0 Answers0