Does GoogleBot see PHP-Code?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
fatman
Forum Commoner
Posts: 47
Joined: Fri Jul 21, 2006 11:18 am
Location: Portugal

Does GoogleBot see PHP-Code?

Post by fatman »

If I dynamically construct a page with PHP-Code, does the GoogleBot see the code on the server, or does it only see the same as client-side?

Code: Select all

if ($site == 'hprp') { 
    echo "Example text1 - hprp"; 
}
if ($site == 'sunrise') { 
    echo "Example text2 - sunrise"; 
}
Will the Bot see only the text I want to display, or will it see both? (Example text1 - hprp or Example text2 - sunrise)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: Does GoogleBot see PHP-Code?

Post by timvw »

fatman wrote:If I dynamically construct a page with PHP-Code, does the GoogleBot see the code on the server, or does it only see the same as client-side?

Code: Select all

if ($site == 'hprp') { 
    echo "Example text1 - hprp"; 
}
if ($site == 'sunrise') { 
    echo "Example text2 - sunrise"; 
}
Will the Bot see only the text I want to display, or will it see both? (Example text1 - hprp or Example text2 - sunrise)
How does 'the Bot' get access to the script? I presume via a HTTP request (so he's a client). The client only sees the output of the script (if everything goes well :D).
User avatar
fatman
Forum Commoner
Posts: 47
Joined: Fri Jul 21, 2006 11:18 am
Location: Portugal

Post by fatman »

Hi timvw

I have to confess, I have no idea how GoogleBot gets access to my pages (Dont know anything much about Bots, Spiders, Crawlers)

I am just curious about SE robots
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Post by kaisellgren »

Answer is NO!
Post Reply