Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    try above code ..it will help you...its working for me Commented Mar 10, 2016 at 7:35
  • Perfect.. thats what I needed. Perfectly works.. But Can you please explain it. So I can understand it properly that what I am doing.. I dont want to just use this I also want to learn. and it will also helps to many fellows also Commented Mar 10, 2016 at 7:41
  • look you first need to learn what is curl and how it works. please refer php.net/manual/en/book.curl.php this will help you.. Commented Mar 10, 2016 at 8:30
  • This code provides proper OP but while writing regexp for particular div it again returns complete html. can you check once. this is my regexp preg_match_all('/.*<div.*class=\"product\-list\-options\".*>.*<a href=\"(.*)\">.*<\/a>.*<\/div>/s',$htmlContent,$matches); I need only href value Commented Mar 10, 2016 at 12:36