Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getMetas($link) {
- $str1 = file_get_contents($link);
- if (strlen($str1)>0) {
- preg_match( '/<meta.*?name=("|')description("|').*?content=("|')(.*?)("|')/i', $str1, $description);
- if (count($description) > 1) {
- return $description[4];
- }
- }
- }
- function Titles($link) {
- $str = file_get_contents($link);
- if( strlen( $str )>0 ) {
- preg_match( "/<title>(.*)</title>/", $str, $titles );
- if (count($titles) > 1) {
- return $titles[1];
- }
- }
- return '';
- }
- It doesn't return anything because no array or anything is specfified.
Add Comment
Please, Sign In to add comment