Author: sich
Date: 2006-04-13 22:11:03 +0000 (Thu, 13 Apr 2006)
New Revision: 8548
Modified:
trunk/apps/DarknetSpiderBot/fcp.php
Log:
DarknetSpiderBot : add auto remove local file at the end of the script, add
more detailled error message on error get for USK keys
Modified: trunk/apps/DarknetSpiderBot/fcp.php
===================================================================
--- trunk/apps/DarknetSpiderBot/fcp.php 2006-04-13 22:01:46 UTC (rev 8547)
+++ trunk/apps/DarknetSpiderBot/fcp.php 2006-04-13 22:11:03 UTC (rev 8548)
@@ -6,7 +6,7 @@
$fcp_port = '9481';
$filename = "D:\\darknet\\bot\\local.html";
-$addresse = "USK at
PFeLTa1si2Ml5sDeUy7eDhPso6TPdmw-2gWfQ4Jg02w,3ocfrqgUMVWA2PeorZx40TW0c-FiIOL-TWKQHoDbVdE,AQABAAE/Index/20/";
+$addresse = "SSK at
PFeLTa1si2Ml5sDeUy7eDhPso6TPdmw-2gWfQ4Jg02w,3ocfrqgUMVWA2PeorZx40TW0c-FiIOL-TWKQHoDbVdE,AQABAAE/Index-21/";
$ok_hello = 0;
$error = NULL;
@@ -89,12 +89,16 @@
}
}
- //Check if the key is USK
- if (preg_match_all('/GetFailed/si', $buffer, $match)) {
+ //On GetFailed increase count to 2
+ if (preg_match_all('/GetFailed/si', $buffer, $match)) {
+ $count = 2;
+ }
+
+ //Get the error description on error
+ if (preg_match_all('/CodeDescription/si', $buffer,
$match)) {
$CodeDescription = explode("=",$buffer);
$CodeDescription = $CodeDescription[1];
$error = "Get Failed : $CodeDescription";
- $count = 2;
}
//If no problem break after two EndMessage
@@ -163,6 +167,8 @@
//Close the file
fclose($fp1);
+ //Delete the local file
+ unlink($filename);
}
}