desception
08-18-2008, 01:29 PM
Hey everyone, I have a problem with my page, I'm trying to SEO it, Here's what I did to begin with.
I have an index.php where my content is, and I'm using this code to include .html pages into my main content page
<?
$val = $_GET['id']; // Replace id with whatever you want to use, eg ?id=page
$dirty = array("..");
$clean = array("");
$val = str_replace($dirty, $clean, $val); // Prevent people from viewing root files like your password (should work i just quikly added it without testing)
if (isset($_GET['id'])) { // Replace id with whatever you want to use, eg ?id=page
if (file_exists($val)) { // This checks if the file you are trying to call exists
include "$val";
}
else {
include "s71.html"; // If the file doesnt exists it calls your 404 error page
}
}
else {
include "s71.html"; // If ?id= is not set it will now go to your news page
}
?>
This allows me to basically link any page like http://www.divxnaruto.com/index.php?id=s71.html
What I want to do is edit the <title> tag to change everytime I hit a different page, For example, s71.html I want the title to say "Naruto Shippuden 71 *DivX HD* Eng-Sub"
I've been testing this method to solving the problem :
<?php if (defined ('TITLE')) {
print TITLE;
} else {
print 'Watch Naruto Episodes Online | Bleach Episodes | Manga';
}
?>
and using this on the .html file :
<?php define ('TITLE', 'Page Title Here');
?>
I'm a no0b, and I really need some help. Thanks guys.
I have an index.php where my content is, and I'm using this code to include .html pages into my main content page
<?
$val = $_GET['id']; // Replace id with whatever you want to use, eg ?id=page
$dirty = array("..");
$clean = array("");
$val = str_replace($dirty, $clean, $val); // Prevent people from viewing root files like your password (should work i just quikly added it without testing)
if (isset($_GET['id'])) { // Replace id with whatever you want to use, eg ?id=page
if (file_exists($val)) { // This checks if the file you are trying to call exists
include "$val";
}
else {
include "s71.html"; // If the file doesnt exists it calls your 404 error page
}
}
else {
include "s71.html"; // If ?id= is not set it will now go to your news page
}
?>
This allows me to basically link any page like http://www.divxnaruto.com/index.php?id=s71.html
What I want to do is edit the <title> tag to change everytime I hit a different page, For example, s71.html I want the title to say "Naruto Shippuden 71 *DivX HD* Eng-Sub"
I've been testing this method to solving the problem :
<?php if (defined ('TITLE')) {
print TITLE;
} else {
print 'Watch Naruto Episodes Online | Bleach Episodes | Manga';
}
?>
and using this on the .html file :
<?php define ('TITLE', 'Page Title Here');
?>
I'm a no0b, and I really need some help. Thanks guys.