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.

4
  • i don't know much about DOM , when i open the link you've provided for DOM there are infinite things to read :O , btw i tried your code it shows an error Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Empty string supplied as input in E:\Installations\xampp\htdocs\wp\test1.php on line 7 Commented Feb 26, 2012 at 14:05
  • @Xufyan check content of $contents (var_dump($contents)) Commented Feb 26, 2012 at 15:12
  • I didn't get you , searched alot :/ could you please explain Commented Feb 26, 2012 at 17:14
  • At first you have to have correct $contents so you have to check whether $contents is empty or not... (curl request was successful) also php.net/manual/en/function.curl-getinfo.php this with CURLINFO_HTTP_CODE should return 200 Commented Feb 26, 2012 at 17:34