PHP and keywords

This is a discussion on PHP and keywords within the PHP Language forums, part of the PHP Programming Forums category; Yes, I am a newbie to PHP. Worried that using PHP may affect my search engine ranking. Would a script ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-10-2005
John Chiurato
 
Posts: n/a
Default PHP and keywords

Yes, I am a newbie to PHP.

Worried that using PHP may affect my search engine ranking. Would a script
like the one below be adequate?

<?php
class Page {
var $Title;
var $Keywords;
var $Content;
}
?>

Thanks



Reply With Quote
  #2 (permalink)  
Old 01-10-2005
Erwin Moller
 
Posts: n/a
Default Re: PHP and keywords

John Chiurato wrote:

> Yes, I am a newbie to PHP.
>
> Worried that using PHP may affect my search engine ranking. Would a script
> like the one below be adequate?
>
> <?php
> class Page {
> var $Title;
> var $Keywords;
> var $Content;
> }
> ?>
>
> Thanks


Hi John,

What is it excactly you want to accomplish?
You example creates a useless class, and produces no output.
So no searchengine cares about it. They cannot see it!

In general: PHP just produces HTML (or pictures, or whatever) as far as the
client is concerned.
If the client is a webbrowser that webbrowser just displays the output (HTML
probably) produced by PHP.
The fact that the server is executing PHP to produce the HTML is of no
concern to the client.
If the client is a searchengine: the same output (HMTL) is produced, and
again the searchengine couldn't care less.

But if you have a few popular pages in plain HTML, and want to change them
to php, changes are that the searchengine will have to reindex them because
the page has a different name. (blabla.php instead of blabla.html)


Regards,
Erwin Moller
Reply With Quote
  #3 (permalink)  
Old 01-10-2005
claudel@gmail.com
 
Posts: n/a
Default Re: PHP and keywords

Also, it should be noted that the search engines will hardly index
pages like page.php?action=view&id=100&whatever=yes&so_on=1. Regarding
this you should take a look on the mod_rewrite facilities.

Reply With Quote
  #4 (permalink)  
Old 01-11-2005
John Dunlop
 
Posts: n/a
Default Re: PHP and keywords

Erwin Moller wrote:

> But if you have a few popular pages in plain HTML, and want to change them
> to php, chances are that the searchengine will have to reindex them because
> the page has a different name. (blabla.php instead of blabla.html)


Only if the published address of the resource wasn't given
enough thought in the first place. Publishers of well-
thought-out URIs do not suffer that disruption. Changing
addresses is an inconvenience not only to the publisher, but
to the public too.

http://www.w3.org/Provider/Style/URI

--
Jock
Reply With Quote
  #5 (permalink)  
Old 01-11-2005
John Dunlop
 
Posts: n/a
Default Re: PHP and keywords

An anonymous being wrote:

> Also, it should be noted that the search engines will hardly index
> pages like page.php?action=view&id=100&whatever=yes&so_on=1.


I don't see why they wouldn't, but if you're implying that
that address looks awful, I agree.

--
Jock
Reply With Quote
  #6 (permalink)  
Old 01-11-2005
Erwin Moller
 
Posts: n/a
Default Re: PHP and keywords

John Dunlop wrote:

> Erwin Moller wrote:
>
>> But if you have a few popular pages in plain HTML, and want to change
>> them to php, chances are that the searchengine will have to reindex them
>> because the page has a different name. (blabla.php instead of
>> blabla.html)

>
> Only if the published address of the resource wasn't given
> enough thought in the first place. Publishers of well-
> thought-out URIs do not suffer that disruption. Changing
> addresses is an inconvenience not only to the publisher, but
> to the public too.
>
> http://www.w3.org/Provider/Style/URI
>


Hi John,

Interesting piece. I read it with pleasure.

Of course the problem is that many softwareprojects must be delivered for a
certain amount of money.
I think this URI-consistency (or how to call it?) is often one of the things
very low on the list. :-(

But I completely agree with you: if thought through well beforehand,
many/all these problems (dead links) can be avoided.

Thanks.

Regards,
Erwin Moller
Reply With Quote
  #7 (permalink)  
Old 01-13-2005
John Chiurato
 
Posts: n/a
Default Re: PHP and keywords

What I am trying to accomplish is a script of viable keywords for each page
drawn from a mysql database so proper ranking and relevancy can be
established. So you say

> If the client is a search engine: the same output (HMTL) is produced, and

again the search engine couldn't care less.

So if I were to write the correct PHP (God help me), the spider would se it
as viable HTML and keywords, correct?

Together with mysql, PHP is some pretty impressive stuff.

Thanks for taking the time to answer my question. I'll be lurking around
here to learn more.





"Erwin Moller"
<since_humans_read_this_I_am_spammed_too_much@spam yourself.com> wrote in
message news:41e2595f$0$6208$e4fe514c@news.xs4all.nl...
> John Chiurato wrote:
>
> > Yes, I am a newbie to PHP.
> >
> > Worried that using PHP may affect my search engine ranking. Would a

script
> > like the one below be adequate?
> >
> > <?php
> > class Page {
> > var $Title;
> > var $Keywords;
> > var $Content;
> > }
> > ?>
> >
> > Thanks

>
> Hi John,
>
> What is it excactly you want to accomplish?
> You example creates a useless class, and produces no output.
> So no searchengine cares about it. They cannot see it!
>
> In general: PHP just produces HTML (or pictures, or whatever) as far as

the
> client is concerned.
> If the client is a webbrowser that webbrowser just displays the output

(HTML
> probably) produced by PHP.
> The fact that the server is executing PHP to produce the HTML is of no
> concern to the client.
> If the client is a searchengine: the same output (HMTL) is produced, and
> again the searchengine couldn't care less.
>
> But if you have a few popular pages in plain HTML, and want to change them
> to php, changes are that the searchengine will have to reindex them

because
> the page has a different name. (blabla.php instead of blabla.html)
>
>
> Regards,
> Erwin Moller



Reply With Quote
  #8 (permalink)  
Old 01-13-2005
Erwin Moller
 
Posts: n/a
Default Re: PHP and keywords

John Chiurato wrote:

Hi John,

> What I am trying to accomplish is a script of viable keywords for each
> page drawn from a mysql database so proper ranking and relevancy can be
> established. So you say
>
>> If the client is a search engine: the same output (HMTL) is produced, and

> again the search engine couldn't care less.
>
> So if I were to write the correct PHP (God help me), the spider would se
> it as viable HTML and keywords, correct?


correct!
When you write something like:
(This is a Postgresql-code, not mySQL)
And this is a fantasy-example.
(Also I wrote the code not very compact to show you what happens)

suppose you have a table called:
tblKeywords
(
keywordid SERIAL (=autonumber) PRIMARY KEY,
pageid int REFERENCES tblpage(pageid),
keyword text
)

where pageid points to some tblpage, ok?


<?
$SQL_keywords = "SELECT keyword FROM tblKeywords WHERE (pageid=45)";
$RS_keywords = pg_exec($connection,$SQL_keywords);
$numrows_keywords = pg_numrows($RS_keywords);
$myKeywords = array();
for ($i=0;$qi<$numrows_keywords;$i++)
{
$row_keywords = pg_fetch_array($RS_keywords,$i,PGSQL_ASSOC);
$myKeywords[] = $row_keywords["keyword"];
}

$keywordsstring = implode("," , $myKeywords);
// untill now we haven't produced ANY output.
// SO untill here no visitor (searchengine or otherwise) sees what we did.

// So, now output it for real:
echo "<meta name='keywords' content = '". $keywordsstring ."'>"
?>


Good luck!

I didn't test the code, but this is how to do it.

Please visit:
http://www.php.net
to find all the functions I used (like implode)

http://www.w3schools.com/SQL
to learn more about SQL. (if needed)

http://www.website101.com/HTML/metatags_seo.html
to learn a bit about metatags.


Enjoy, PHP is a good choice, you will enjoy it!

Regards,
Erwin Moller


>
> Together with mysql, PHP is some pretty impressive stuff.
>
> Thanks for taking the time to answer my question. I'll be lurking around
> here to learn more.
>
>
>
>
>
> "Erwin Moller"
> <since_humans_read_this_I_am_spammed_too_much@spam yourself.com> wrote in
> message news:41e2595f$0$6208$e4fe514c@news.xs4all.nl...
>> John Chiurato wrote:
>>
>> > Yes, I am a newbie to PHP.
>> >
>> > Worried that using PHP may affect my search engine ranking. Would a

> script
>> > like the one below be adequate?
>> >
>> > <?php
>> > class Page {
>> > var $Title;
>> > var $Keywords;
>> > var $Content;
>> > }
>> > ?>
>> >
>> > Thanks

>>
>> Hi John,
>>
>> What is it excactly you want to accomplish?
>> You example creates a useless class, and produces no output.
>> So no searchengine cares about it. They cannot see it!
>>
>> In general: PHP just produces HTML (or pictures, or whatever) as far as

> the
>> client is concerned.
>> If the client is a webbrowser that webbrowser just displays the output

> (HTML
>> probably) produced by PHP.
>> The fact that the server is executing PHP to produce the HTML is of no
>> concern to the client.
>> If the client is a searchengine: the same output (HMTL) is produced, and
>> again the searchengine couldn't care less.
>>
>> But if you have a few popular pages in plain HTML, and want to change
>> them to php, changes are that the searchengine will have to reindex them

> because
>> the page has a different name. (blabla.php instead of blabla.html)
>>
>>
>> Regards,
>> Erwin Moller


Reply With Quote
  #9 (permalink)  
Old 01-24-2005
Scott Orsburn
 
Posts: n/a
Default Re: PHP and keywords

claudel@gmail.com wrote:

>Also, it should be noted that the search engines will hardly index
>pages like page.php?action=view&id=100&whatever=yes&so_on=1. Regarding
>this you should take a look on the mod_rewrite facilities.
>
>



I'm not prepared to state that search engines will index URLs with long
query strings, but the major web crawlers will in fact index URLs with
query strings (a la:
http://domain/file.php?variable=valu...2=anothervalue).


--
Scott Orsburn
scottso_no@spam_maclaunch.com

Kaomso | Information Technology
www.kaomso.com

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0