![]() If (isset( $match ) & is_array ( $match ) & count ( $match ) = 3 ) If (isset( $match ) & is_array ( $match ) & count ( $match ) > 0 ) Please note that the regular expressions included were split into strings because php.net was complaining about the line being to long ) Using the function getUrlContents(), also included, it takes care of META REFRESH re-directions, following up to the specified number of redirections. If there's an error, it will return false. ' print_r ( $result, true ) echo '' īased on Michael Knapp's code, and adding some regex, here's a function that will get all meta tags and the title based on a URL. ![]() If (!isset($maximumRedirections) || $currentRedirection If (isset($match) & is_array($match) & count($match) = 2 & count($match) = 1) $contents = Check if we need to go somewhere else If (version_compare(PHP_VERSION, '5.4.0') = -1)įor ($i=0, $limiti=count($names) $i htmlentities($originals, $flags, 'UTF-8'),įunction getUrlContents($url, $maximumRedirections = null, $currentRedirection = 0) If (count($originals) = count($names) & count($names) = count($values)) If (isset($match) & is_array($match) & count($match) = 4) If (isset($match) & is_array($match) & count($match) > 0) If (isset($contents) & is_string($contents)) ![]() New version based on mariano at cricava dot com's work with:ġ) Support for Meta properties (like Facebook's og tags).Ģ) Support for Unicode (UTF-8) encoded Meta lines.ģ) An option not to convert htmlentities - if you plan to actually use the results and not just display them.įunction getUrlData($url, $raw=false) // $raw - enable for raw display Search engines can use these tags when organizing and displaying search results.Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting User Submitted Data Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation GUI Extensions Keyboard Shortcuts ? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search HTML files contain meta tags that include information about the page - its author, a description, some keywords, or even special instructions that tell a web browser how to display the page contents. HTML files and websites frequently use metadata to provide information about the content of a webpage to search engines. This index allows you to quickly search your computer for files using the information in file metadata. Most modern file systems use an index of file metadata for file searches. Some metadata can be modified while editing a file, like specifying an author's name other metadata is automatically set by the computer's operating system or the software creating the file, like a file creation date. Metadata does not usually appear when viewing a file, although it can often be displayed when needed. A text document's metadata may include metadata listing the author's name, the document's title, and a summary of its contents. For example, a digital image may include metadata like the date and time of the photograph, its location, and the camera and settings used. Digital files often include metadata to provide information about the file and its contents. ![]() Metadata is data that describes other data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |