/**
* Implementation of the crawler function
*/
function security_scanner_crawler($path) {
// Create a new object and parse the page
$obj = new drupal_security_scanner_test();
// Set the cookie
$session_cookie =
variable_get('security_scanner_cookie',
'');
$obj->
curl_options =
array(
CURLOPT_COOKIE => $session_cookie,
);
$obj->drupalGet($path);
$obj->parse();
return $obj;
}
#1 update:
db_query("UPDATE {crawler_links} SET status = 2 WHERE crawler_id = %d and status = 1 LIMIT 1",
$crawler_id);
#2 update:
db_query("UPDATE {crawler_links} SET status = 3 WHERE path = '%s' and status = 2 LIMIT 1",
$form_details['path']);
#3 update:
db_query("UPDATE {crawler_links} SET status = '4' WHERE id = %d",
$form_details['id']);