Lijoyx Posted May 30, 2008 Share Posted May 30, 2008 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 More sharing options...
thebadbad Posted May 30, 2008 Share Posted May 30, 2008 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." /> Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553299 Share on other sites More sharing options...
Lijoyx Posted May 30, 2008 Author Share Posted May 30, 2008 so u r suggesting there is no way to do that with php ? Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553300 Share on other sites More sharing options...
thebadbad Posted May 30, 2008 Share Posted May 30, 2008 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 Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553302 Share on other sites More sharing options...
thebadbad Posted May 30, 2008 Share Posted May 30, 2008 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. Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553305 Share on other sites More sharing options...
haku Posted May 30, 2008 Share Posted May 30, 2008 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. Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553306 Share on other sites More sharing options...
Lijoyx Posted May 30, 2008 Author Share Posted May 30, 2008 thank u guys that was informative. Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553364 Share on other sites More sharing options...
saint959 Posted May 30, 2008 Share Posted May 30, 2008 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. Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553372 Share on other sites More sharing options...
haku Posted May 30, 2008 Share Posted May 30, 2008 That's very true, it's black-hat SEO. But google also recognizes that many users don't have javascript turned on, so something like the method I mentioned isn't black hat SEO, it's providing a non-javascript alternative. Link to comment https://forums.phpfreaks.com/topic/107940-solved-search-engine-bots/#findComment-553501 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.