Jump to content

[SOLVED] search engine bots


Lijoyx

Recommended Posts

hi all,

 

i have a genuine doubt.you should help me in this.

 

i am developing a php site. i have a lot of paragraphs in most of the pages.

but in one page i cant use any writings. that page only have a flash and the usual header and footer. this flash have all the details that the user wants. as i have heard that search bots cant read texts in flash.

this page is so important that it should come in the google search.

 

is there any mechanism in php so that i can append a description paragraph in that page, which is visible only to the search bots and not to the customers.

Link to comment
https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/
Share on other sites

This is not a PHP question, but (X)HTML, since that's what the bots and users see. You're looking for a <meta> tag for a description of the page. Put this between your <head> tags, and search engines will index it (users wont see it, except if they look through the source code of the page):

 

<meta name="description" content="This page is about bla bla bla." />

Yes, PHP has nothing to do with the user/robot, since it's rendered server side.

 

To clarify my post above, it seems that most search engines DOESN'T index the mega tags. Some search engines use the meta "description" to describe the result found, but it seems you won't find that content by search. I did found out however, that Google DOES index the contents of flash files, so I guess you're fine without doing anything! http://www.searchengineworkshops.com/articles/flash.html

Come to think of it, there may be one way to distinguish robots from actual humans. The user agent string. I know that The Google Bot's user agent string is/was "Googlebot/2.1 (http://www.googlebot.com/bot.html)". You access the user agent string with PHP:

 

<?php
$useragent = $_SERVER['HTTP_USER_AGENT'];
?>

 

But remember that this can be spoofed by the user.

You can echo out the meta tag with php. But it's still an (X)HTML issue, as you will be echoing out (X)HTML.

 

Personally, I use the swfobject method to insert flash onto a page. With this method you can set up a div with html data in it, and if/when the flash is loaded, it replaces all this html data with the swf. This means that bots see the original html, and users (with javascript enabled) see the flash video.

Hi, i know this is solved but i think i can give some input.

 

Just be careful of only showing the google bot something and not the user. Google could very likely see this as you trying to "cheat" them by showing one thing to the user and another to the search engines.

 

Just something to take into consideration i think.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.