homepage Welcome to WebmasterWorld Guest from 54.211.113.223
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php meta tags, they say it can't be done
when they say no to php meta tags, I feel that there is a way.
melsmiracle

5+ Year Member



 
Msg#: 3658200 posted 4:38 pm on May 24, 2008 (gmt 0)

Hi

I have been searching the webmaster world for a solution to a problem. I am having a membership site set up with g***r one. I gave them the files in html and they are now converting to php. At the g***r site, there is a seo helper that produced the following code for me.
I gave them the code and they said :
I cannot put this code into *********.com, because we have implemented the code in php and we don't use <head> in php,

Now I am a total newbie at this, but from what I've read in posts at this site, you can use meta tags, description etc. and a lot of people do use title tags, meta descriptions and keywords...

So how do I present this to the guys so that they will use it or think it is do-able in php?

Here is the code I gave them...

Please copy and paste the following inside the <head> and the </head>
Afterwards your site will be fully compliant with all standards and indexable by all spiders.

<meta name="keywords" CONTENT="stress, stress to rest, relax, feel better, stress management, relaxation, therapy, hypnosis, hypnotherapy, free mp3, ">
<meta name="description" CONTENT="http://www.Put***********est.com Get a Free mp3 stress reduction session and get lots of cool tools to help you reduce and blast away your stress now. Put stress to rest for good.">
<meta name="author" CONTENT="Mel Hirsch">
<meta name="copyright" CONTENT="Put********est.com c 2008">
<meta name="rating" CONTENT="General">
<meta name="revisit-after" CONTENT="31">
<meta name="robots" CONTENT="ALL">
<meta name="distribution" CONTENT="Global">
<meta http-equiv="content-language" CONTENT="en">
<meta http-equiv="reply-to" CONTENT="support@put**********est.com">
<meta http-equiv="pragma" CONTENT="cache">
<meta http-equiv="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.example.com/safe/ratings.htm" l r (s 0));>
<meta name="GENERATOR" content="The ******** Meta Generator">

Thanks for any and all help. When they say no, they can't do it, it makes me look for a solution...I know it can be done, I just don't know how and your posts say it can be done....
Thanks for your help.

[edited by: dreamcatcher at 6:18 pm (utc) on May 24, 2008]

[edited by: tedster at 12:01 am (utc) on May 25, 2008]
[edit reason] use example.com. Thanks. [/edit]

 

cameraman

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3658200 posted 5:39 pm on May 24, 2008 (gmt 0)

Welcome to WebmasterWorld, melsmiracle.
From your text, they're not saying they can't, they're saying they don't.
Of course it can be done, and I don't understand why they wouldn't but I suppose they may have their reasons. If they actually can't then, speaking in opinion from my armchair with no further information than what you've given, it would make me wonder what they will be able to do in the future and I would need to reassess the relationship with them. But that's just me.

melsmiracle

5+ Year Member



 
Msg#: 3658200 posted 5:53 pm on May 24, 2008 (gmt 0)

They have an option where they do all of your deign but not the copy or you do it all and give them the content to upload. I did the second option for one site and the first option for another site.
So with this site, they are uploading already provided copy, but I gave them the info in html and I can change that code even as a newbie... but have no clue how to change it in php. So I need to find the fix and email them the php code. I'm learning as I go here... and will give them all of it already done next time when I hand over the html code... them maybe it can be translated without any trouble..I'm not sure...it's all greek to me....
Thanks for your support...

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3658200 posted 6:48 pm on May 24, 2008 (gmt 0)

if they want it in php instead of html, then maybe you can just hand it back looking like this..

<?php
echo '<meta name="blah" content="blah blah">';
echo '<meta name="blah" content="blah blah">';
echo '<meta name="blah" content="blah blah">';
?>

Receptional Andy



 
Msg#: 3658200 posted 7:00 pm on May 24, 2008 (gmt 0)

Afterwards your site will be fully compliant with all standards and indexable by all spiders

Incidentally, the vast majority of the meta elements in the first post serve no useful purpose whatsoever. Personally, the only ones I would include are the Content-Type (if it isn't set by the server already) and the description . Maybe the author and keywords at a push. The rest are just consuming bandwidth unnecessarily.

None of the elements are necessary for spiderability, or to comply with standards.

Marcia

WebmasterWorld Senior Member marcia us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3658200 posted 7:21 pm on May 24, 2008 (gmt 0)

What are they supposed to be doing for you?

melsmiracle

5+ Year Member



 
Msg#: 3658200 posted 8:40 pm on May 24, 2008 (gmt 0)

I have two different deals with them. I am creating two different paid membership sites. The first one, I paid for them to do website design and then set up in their program to use the <premium> tools etc. I am providing all new content from scratch. I do the copy, they do not to any copy writing. And with theit tools there is a seo optimizer tool that you feed in your data and it spits out the code, like above referenced code. And since I am creating pages, I can put that in.
The second membership site, I purchased an already done, all inclusive...kind of...membership site/content. They had free membership software with it too, but I opted to use the <premium> stuff because I like the tools, tracking, etc. that I have there.
So, for that membership site, they are only loading content and setting up my tools for me. Which is where my dilemma came in. I gave them html and they've now converted it to php....the site is just about to go live. I've been learning some basic seo stuff with Jeff Johnsons stuff and wanted to optimize it better for search... so since I can't add html code to it anymore.... and that part is my job,(to give them complete content) but it's frustrating, because if it were still in html I could do it... so here I am....

[edited by: tedster at 12:02 am (utc) on May 25, 2008]

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3658200 posted 8:51 pm on May 24, 2008 (gmt 0)

maybe if you tell us what you are allowed to add, then we can help you with what to write.

can you include actual php code?
can you include a separate file within the page?

when they say they have "converted your html to php", and "can no longer add any more html" that sounds to me like they are trying to fob you off.
they've probably split up the different segments into a template - but it is still likely to be the exact same code underneath. maybe they have loaded it into a database or something.
but all they've got to do is cut and paste your stuff into the template and upload it again. it would literally take thirty seconds.

OutdoorMan

5+ Year Member



 
Msg#: 3658200 posted 9:08 pm on May 24, 2008 (gmt 0)

and they said :
I cannot put this code into *********.com, because we have implemented the code in php and we don't use <head> in php

Neither do I -- But I use <head> in HTML ;)

You can only implement a <head> section where there is HTML output -- and it's actually mandatory in HTML documents to have a <head> section (at least if you want your HTML documents to be valid.)

Maybe your request was misunderstood by them? And by the way... Who are 'they'? I didn't quite get that.

melsmiracle

5+ Year Member



 
Msg#: 3658200 posted 10:01 pm on May 24, 2008 (gmt 0)

I got the reply that they couldn't do as I requested...
This was all he said....
I cannot put this code into your www.put*******st.com, because we have implemented the code in php and we don't use <head> in php, however, If you say, I can put this code into your other website, which is www.ili********py.com.

I guess the second site is still in html... the first one is not...

netchicken1

5+ Year Member



 
Msg#: 3658200 posted 11:03 pm on May 24, 2008 (gmt 0)

I use php to pull the first 250 charactors from the post and use it as the keywords metatag

I also pull the title and use that as the description tag.

Nothing could be easier to create.

OutdoorMan

5+ Year Member



 
Msg#: 3658200 posted 11:16 pm on May 24, 2008 (gmt 0)

I guess the second site is still in html... the first one is not...

Let's clarify things here:

1) (X)HTML is the output to view in a browser -- this is what the user see when he or she visits a website (client side).

2) PHP is a (server side) technology -- the user don't actually see what's happening on the server... PHP is executed on the server ;) Users will only see the output in a browser, which is the (X)HTML, not the PHP.

Therefore both sites 'is in HTML'.

The person who wrote the reply maybe don't understand what you're request is about... or else he or she don't understand the difference between (X)HTML and PHP.

[edited by: OutdoorMan at 11:31 pm (utc) on May 24, 2008]

melsmiracle

5+ Year Member



 
Msg#: 3658200 posted 2:40 am on May 25, 2008 (gmt 0)

netchicken1
In your answer, is that something anyone can do and is it something that you can just put in a code to tell it to pull the title for description and the 250 for keyword meta?

Could you show me, tell me, or direct me to where I can get it done and what to tell them...like rentacoder or something....
Thanks...
I use php to pull the first 250 charactors from the post and use it as the keywords metatag

I also pull the title and use that as the description tag.

Nothing could be easier to create.

And outdoor man...thanks for your clarification...it's still greek to me, but less greek than a few hours ago...
Thanks to all for your help, suggestions and education...
Mel

OutdoorMan

5+ Year Member



 
Msg#: 3658200 posted 11:25 am on May 25, 2008 (gmt 0)

netchicken1
In your answer, is that something anyone can do and is it something that you can just put in a code to tell it to pull the title for description and the 250 for keyword meta?

Anyone could do it like this (simplyfied example):


<?php

// Open database here...

// SQL
$sql = mysql_query("SELECT * FROM database WHERE id = '" . $id . "' LIMIT 1") or die (mysql_error());

while($row = mysql_fetch_array($sql)){
$title = $row['title']; // get title from database
$description = $row['description']; // get description from database
$keywords = substr($row['keywords'], 0, 250); // get keywords (250 characters) from database
}

// Close database here...
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><?php echo $title?></title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en">
<meta name="description" content="<?php echo $description?>">
<meta name="keywords" content="<?php echo $keywords?>">
</head>
<body>

<!-- HTML content goes here... -->

</body>
</html>

It can be done, pretty much, as simple as shown above :)

[edited by: OutdoorMan at 11:28 am (utc) on May 25, 2008]

topr8

WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3658200 posted 11:57 am on May 25, 2008 (gmt 0)

can i just look at the wood rather than the trees for a moment?

you talk about 'paid membership site' ... well are those pages going to be viewable if you are not a paid member?

because if the answer is 'no' then those pages are not going to be in an search engine index anyway - how is a spider going to view the pages without being a member?

of course, i know there are ways to get members only pages indexed by search engines - however i'd first ask if this is being done, because if it isn't then all this talk about HEAD is largely a waste of time as you are doing it for SEO reasons and your pages are not going to be indexed anyway.

StoutFiles

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3658200 posted 1:35 pm on May 25, 2008 (gmt 0)

I gave them html and they've now converted it to php....

Why? Do they not know you can use html outside of the <?php ?> brackets? From what I've read so far they don't seem to know what they're doing.

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3658200 posted 8:39 pm on May 25, 2008 (gmt 0)

*** we don't use <head> in php ***

I agree that they don't appear to know what they are talking about.
Their competence is in question here.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved