blondsplash

blondsplash

Joined
Oct 05, 2011

Activity Stream

blondsplash commented on a Page, Dynamic Title and Meta Tags  -  Oct 06, 2011

Hawkee, disregard the last comment, I GO IT WORKING!!!!

Thanks so much for the code, you are awesome!!!!

 Respond  
blondsplash commented on a Page, Dynamic Title and Meta Tags  -  Oct 05, 2011

Hawkee, Can you help?

I created a file and named it get_meta.php this is the code on that file:

<?php

$database = 'get_meta.php';
$meta_db = fopen($database, 'r');

$page = $_SERVER['SCRIPT_NAME'];
$page = substr($page, 1);
echo $page;

while($data = fgetcsv($meta_db, 9000, '|'))
{
if($data[0] == $page)
{
$title = $data[1];
$meta_keywords = $data[2];
$meta_description = $data[3];
}
}

?>

?movie=211|Horror Movie: 100 Feet|100 Feet, ghost story horror movie, ghost scary movie|A ghost story

I'm calling the file with this code on the header <?php include('get_meta.php'); ?> and have added this code also:

<?php print $title; ?>

I have a MySQL movie database in my server. In the database the movie id is 211, the url for the same movie is http://www.besthorrormovielist.com/movieinfo.php?movie=211.

Do you see any typos and in get_meta.php is my format correct? I have been trying to fix this on my site for months and cannot get it to work.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.