View Single Post
Old 09-13-2003, 02:35 PM   #1
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
1.6.2 fix to crawl binary files

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:
PHP Code:
return array('tempfile'=>$tempfile,'tempfilesize'=>$tempfilesize); 
and replace with the following:
PHP Code:
    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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote