How to get HTML page title using php? I created a php network crawler, and I want to implement this function in my crawler so that it has a page name and URLs. Thanks in advance. Use of preg_match is possible.
Would that help?
$myURL = 'http://www.google.com'; if (preg_match( '/<title>(.+)<\/title>/', file_get_contents($myURL),$matches) && isset($matches[1] ) $title = $matches[1]; else $title = "Not Found";
Source: https://habr.com/ru/post/1790317/More articles:Failed to get dynamic instance variables through reflection PHP - reflectionExclude view from blur android - androidHow can I detect with javascript if the attribute "#" is added to the url? - javascript.live () or .livequery () - jquerycheck the meaning of checkboxes inside listview - c #How to check if Flash players are installed on Android - javascriptПолучить текущую встречу Outlook - c#Using gobject.timeout_add_seconds - Segmentation Error - pythonPHP, XML - Получить дочерние узлы и их атрибуты - domUsing @RunAs in my EJB schedulers - schedulerAll Articles