Source Code



Get Meta Tag Information

  • anonymous
  • Dec 18' 13
  • PHP
  • 482
  • 34
  • United States

How Google describes a web in search results, by attaching a web information such as title, description etc. This source code is sample how google get information about the site.

check this out :


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Check Like a Google</title>

</head>

<body>

<?php
// this is source URL or webpage
$tags = get_meta_tags(''http://www.pasarkode.com/''); //this is sample web, you can different URL

//the data parsed like a array
$author=$tags[''author''];       // name
$description=$tags[''description''];  // pasarkode description
$keyword=$tags[''keywords''];     // keyword of pasarkode
?>
<div style=" padding:5px; text-align:center; border:1px dotted #ccc">
<h2><?php echo $author; ?></h2>
</div>
<div style="text-align:center; padding:5px; border:1px dotted 3CC">
<?php echo $description;?>
<br />
<?php echo $keyword;?>
</div>
</body>
</html>



Run to browser to view the result

  • Tags : google, php, meta, tags
comments powered by Disqus

Related Code

Vulnerable Scan Web

Create Tags Using Explode



Category

Tag Linked