Get DIV content from external Website

前端 未结 4 1871
遥遥无期
遥遥无期 2020-11-29 22:53

I want to get a DIV from an external website with pure PHP.

External website: http://www.isitdownrightnow.com/youtube.com.html

Div text I want from isitdownr

4条回答
  •  借酒劲吻你
    2020-11-29 23:16

    $contents = file_get_contents($url); 
    
      $title = explode('
    ',$contents); $title = explode("
    ",$title[1]); $fp = fopen ("s.php", "w+"); fwrite ($fp, "$title[0]"); fclose ($fp); require_once('s.php');

提交回复
热议问题