Charter
09-13-2003, 01:35 PM
This is a 1.6.2 temporary fix to crawl binary files. This fix is not included in the 1.6.2 download but will be improved upon and included in the next release.
First make a backup of the robot_functions.php file. Then in robot_functions.php, find the function phpdigTempFile. In the function phpdigTempFile, find the following:
return array('tempfile'=>$tempfile,'tempfilesize'=>$tempfilesize);
and replace with the following:
switch ($result_test['status']) {
case 'MSWORD':
$my_new_tempfile = $tempfile;
break;
//case 'MSEXCEL':
//$my_new_tempfile = "<fill in>";
//break;
case 'PDF':
$my_new_tempfile = $tempfile."2.txt";
break;
default:
$my_new_tempfile = $tempfile;
}
return array('tempfile'=>$my_new_tempfile,'tempfilesize'=>$tempfilesize);
It seems that $my_new_filename can be different depending on external binary defaults, something to work on for the next release. In the meantime, after crawling a binary file, go to the temp directory and look at the extention, modifying the above as necessary.
First make a backup of the robot_functions.php file. Then in robot_functions.php, find the function phpdigTempFile. In the function phpdigTempFile, find the following:
return array('tempfile'=>$tempfile,'tempfilesize'=>$tempfilesize);
and replace with the following:
switch ($result_test['status']) {
case 'MSWORD':
$my_new_tempfile = $tempfile;
break;
//case 'MSEXCEL':
//$my_new_tempfile = "<fill in>";
//break;
case 'PDF':
$my_new_tempfile = $tempfile."2.txt";
break;
default:
$my_new_tempfile = $tempfile;
}
return array('tempfile'=>$my_new_tempfile,'tempfilesize'=>$tempfilesize);
It seems that $my_new_filename can be different depending on external binary defaults, something to work on for the next release. In the meantime, after crawling a binary file, go to the temp directory and look at the extention, modifying the above as necessary.