|
Meta Tag Generator
$siteurl = "http://www.howamazing.com/";
if ($results=="true") {
$expiresCorrect = eregi("([mon,tues,wednes,thurs,fri,satur,sun]{1})day, ([0-9]{1,2})-[a-z]*-([0-9]{4}) ([0-9]{2}):([0-9]{2}):([0-9]{2}) ([a-z]{3})",$expires); #
if (!$expires && ($expiresYear | $expiresMonth | $expiresDay)) {
$expires = date("l, d-F-Y H:i:s T", mktime (0,0,0,gmdate("m")+$expiresMonth,gmdate("d")+$expiresDay,gmdate("Y")+$expiresYear));
$expiresCorrect = "nodouble";
}
if (!$title | !$keywords | !$description | ($expires && $expiresYear) | ($expires && $expiresMonth) | ($expires && $expiresDay) | (!$expiresCorrect && $expires)) {
echo "Warnings";
if (!$title) {
echo "- You have not specified a title, most browsers will use your URL as the title.
";
}
if (!$keywords) {
echo "- You have not specified any keywords, this could damage your position in some search engines.
";
}
if (!$description) {
echo "- You have not specified a description, this could reduce the number of people who visit your site from some search engines.
";
}
if (($expires && $expiresYear) | ($expires && $expiresMonth) | ($expires && $expiresDay) && $expires != "nodouble") {
echo "- You have specified both and exact expiry date using the textbox and a relational expiry date using the drop-down menus. The exact expiry date will be used.";
}
if (!$expiresCorrect && $expires) {
echo "
- You have entered and invalid expiry date, so your page will not expire.
";
}
echo " ";
}
echo " Your meta tags";
echo "<HEAD>";
if ($title) {
echo "<TITLE>$title</TITLE> ";
}
if ($email) {
echo "<LINK REV=made href=\"mailto:$email\"> ";
}
if ($keywords) {
echo "<META NAME=keywords CONTENT=\"$keywords\"> ";
}
if ($description) {
echo "<META NAME=description CONTENT=\"$description\"> ";
}
if ($expires) {
echo "<META HTTP-EQUIV=Expires CONTENT=\"$expires\"> ";
}
if (!$robotsNoindex && !$robotsNofollow) {
echo "<META NAME=ROBOTS CONTENT=ALL> ";
}
elseif (!$robotsNoindex && $robotsNofollow) {
echo "<META NAME=ROBOTS CONTENT=INDEX,NOFOLLOW> ";
}
elseif ($robotsNoindex && !$robotsNofollow) {
echo "<META NAME=ROBOTS CONTENT=NOINDEX,FOLLOW> ";
}
elseif ($robotsNoindex && $robotsNofollow) {
echo "<META NAME=ROBOTS CONTENT=NONE> ";
}
echo "</HEAD> ";
echo "<!-- Meta tags generated at $siteurl -->";
echo " ";
}
$today=gmdate("l, d-F-Y H:i:s T");
echo "Metatag Setup";
?>
|