<?php $dom = new DOMDocument(); $opts = array('http'=>array('header' => "User-Agent:MyAgent/1.0\r\n")); $context = stream_context_create($opts); $html = file_get_contents('https://time100.ru/online',false,$context); $dom->validateOnParse = true; $dom->loadHTML($html); $dom->preserveWhiteSpace = false; $classname="time"; $time = $dom->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' $classname ')]"); echo $time->nodeValue; ?> 

Issues HTTP ERROR 500

PHP version 7.1

  • <? php ini_set ('display_errors', 1); error_reporting (E_ALL); ?> - Dizzy221 2:01 pm
  • prntscr.com/n4o7vo - Denis Frolov
  • Now you have all the necessary data to start correcting your mistakes - Dizzy221
  • deleted line 9, error - Denis Frolov
  • I deleted the 9th and 12th line and then the 11th line, but now it does not produce anything. Blank screen - Denis Frolov

0