Extract keywords from a webpage

<? $meta = get_meta_tags('https://codepad.co/'); $keywords = $meta['keywords']; // Split keywords $keywords = explode(',', $keywords ); // Trim them $keywords = array_map( 'trim', $keywords ); // Remove empty values $keywords = array_filter( $keywords ); print_r( $keywords );
A great code snippet to extract easily meta keywords from any webpage.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.