Guest User

Untitled

a guest
Oct 16th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. include 'curl_query.php';
  2.  
  3. $cocos = $dom->find('#header');
  4.  
  5. foreach ($cocos as $coc) {
  6. echo $coc->plaintext;
  7. }
  8.  
  9. function curl_get($url, $referer = 'https://www.google.ru') {
  10. $ch = curl_init();
  11.  
  12. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  13. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  14. curl_setopt($ch, CURLOPT_URL, $url);
  15. curl_setopt($ch, CURLOPT_HEADER, 0);
  16. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');
  17. curl_setopt($ch, CURLOPT_REFERER, $referer);
  18. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  19.  
  20. $data = curl_exec($ch);
  21. return $data;
  22. }
  23.  
  24. Fatal error: Uncaught Error: Call to a member function find() on boolean in C:OpenServerOSPaneldomainsparserparcer.php:39 Stack trace: #0 {main} thrown in C:OpenServerOSPaneldomainsparserparcer.php on line 39
Add Comment
Please, Sign In to add comment