I created following meta tags in head
<meta name="image" content="image url" />
<meta name="title" content="Page title" />
Now I used following code to extract URL and then the tags
$url='http://' .$_SERVER[ 'HTTP_HOST'].$_SERVER[ 'REQUEST_URI'];
$tags = get_meta_tags($url);
$image = $tags['image'];
$title = $tags['title'];
The page however keeps loading and outputs nothing.