PHP meta tags reader

Hi ,
    I need a script in php which can read meta tage of a URL submited by user in text box on my web page then print them seprately to TITLE Description and Keywords in the shape of a web form ..please my english is not good...You can see example here http://directory.r-tt.com/Submit_URL/ i need the smillar script
thomas9999Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

spotxCommented:
phpinfo();
will show you what information is available to your script in your particular version of php under its particular environment
the reuslts will be available via global arrays ie $_SERVER etc

that way you can find what you can get rather than what everyone else can get on thier srever that may not be available to you
spotxCommented:
sorry I just checked out the site you where talking about
the way this would be done is via
fopen(URL)
read the contents in then parse the meta tag info
check out
http://php.net/manual/en/function.fopen.php
tolgaongCommented:
$url='http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_21828969.html';
$tags = get_meta_tags($url);

echo "<pre>";
print_r($tags); //$tags["keywords"];
echo "</pre>";
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

thomas9999Author Commented:
Hello tolgaong..
                      your example work but its only print the result i need the same thing as is on http://directory.r-tt.com/Submit_URL/  ... Please all paste the script in PHP if  u can thanksss
tolgaongCommented:
<html>
<head>
<title>Your Site name</title>
</head>

<body>
<?php
if (!isset($_POST["url"])){
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Please enter URL:</td>
    </tr>
  <tr>
    <td><input name="url" type="text" value="http://" size="40" maxlength="100">
      <input type="submit" name="Submit" value="Submit"></td>
    </tr>
</table>
</form>
<?php
}
else {
$url=$_POST["url"];
$html=file_get_contents($url);
if (preg_match('/<title>([\\w\\W]+)<\/title>/', $html, $regs)) {
      $title= $regs[1];
} else {
      $title= "";
}
$tags = get_meta_tags($url);

?>
<table width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Enter Title:</td>
  </tr>
  <tr>
    <td><input name="title" type="text" id="title" size="50" value="<?php echo $title ?>"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Enter Description:</td>
  </tr>
  <tr>
    <td><textarea name="desc" cols="70" rows="6" id="desc"><?php echo $tags["description"] ?></textarea></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Enter Keywords:</td>
  </tr>
  <tr>
    <td><textarea name="keyword" cols="70" rows="6" id="keyword"><?php echo $tags["keywords"]?></textarea></td>
  </tr>
</table>

<?php
}
?>
</body>
</html>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thomas9999Author Commented:
Thanks tolgaong
Its working ..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.