Page 1 of 1

Can a spider start a php process?

Posted: Sat Feb 03, 2007 3:52 pm
by SmokyBarnable
I have a php page the does an api call when the page is loaded. I am wondering if a search engine spider could also trigger the api call?

Thanks.

Posted: Sat Feb 03, 2007 4:12 pm
by Ollie Saunders
Depends on how accessible the page is. Generally the answer is yes.

Posted: Sat Feb 03, 2007 9:43 pm
by SmokyBarnable
Wouldn't the spider just read the html and ignore the php? That is, aren't php functions and includes invisible to spiders?

Posted: Sat Feb 03, 2007 9:57 pm
by feyd
Browsers, just like spiders, don't see the PHP code if it's processed by the server. ... So yes, they are invisible to the spider, just as they are to the browser; however, no they will not be ignored without code in the PHP to not run it when a spider is requesting the page.

Posted: Sat Feb 03, 2007 9:58 pm
by nickvd
php gets executed on the server, so by the time the spider sees the content of the page, php has already done it's job...

Posted: Sat Feb 03, 2007 10:21 pm
by SmokyBarnable
I'm confused so to clarify my question:

Code: Select all

<?php
require('includes/application_top.php');
require_once 'admin/functions/helpers.php';  
dosomething();
?>
<head>
<title>Title</title>
<meta name="robots" content="noindex,nofollow" />
</head>
So my question is does the spider see and execute the dosomething() function?

Thanks.

Posted: Sat Feb 03, 2007 10:27 pm
by dude81
No , Spider(If it is a browser) doesn't do it. It is to be done at your server which you are calling in the address bar.
i.e.

Code: Select all

http://yourserver.com/pageyouraccessing.php
I would like to know did you save the file as .php extension. or .html extension. Does your server has php installed??

Posted: Sat Feb 03, 2007 10:33 pm
by SmokyBarnable
Yes it is a php page. I just wanted to make certain that only humans could make my php function create an api call on page load and not spiders.

Posted: Sat Feb 03, 2007 10:37 pm
by dude81
:D , For spider to execute your Api functions you need to write a javascript function.