batch/1.1/old/testDataTxt.php
2013-06-19 08:24:49 +00:00

46 lines
1.4 KiB
PHP

#!/usr/bin/php -c/var/www/batch/config/php_batch_sd.ini
<?php
$str=utf8_decode(file_get_contents('/root/kompass/French Contacts Part 1.txt'));
if (preg_match_all('/DVD\-Rom Black N°8 \- Avril 2011 Page (\d+) KOMPASS France Copyright(?:.*)COMPANY CARD On 11\/16\/11([0-9A-Z\s]{20,160)(\d\d\d\d\d) (.*)ID number \: (.*)Update \:(.*)General information(?:.*)SIREN\-SIRET \: (\d\d\d\d\d\d\d\d\d) (\d\d\d\d\d)/Uis', $str, $matches)) {
foreach ($matches[0] as $i=>$tmp) {
echo "Page ........... ".$matches[1][$i].EOL;
echo "ENTREPRISE ..... ".$matches[2][$i].EOL;
echo "CP ............. ".$matches[3][$i].EOL;
echo "Ville .......... ".$matches[4][$i].EOL;
echo "ID ............. ".$matches[5][$i].EOL;
echo "Date MAJ ....... ".$matches[6][$i].EOL;
echo "SIREN NIC....... ".$matches[7][$i].' '.$matches[8][$i].EOL;
echo EOL;
}
//print_r($matches);
}
echo $str;
die();
/*DVD-Rom Black N°8 - Avril 2011 Page 4 KOMPASS France Copyright
^LCOMPANY CARD On 11/16/11
COMPANY CARD On 11/16/11
3 G
Eurl du Chardonnet
53 Rue Desserteaux
(.*)
*/
include_once(FWK_PATH.'common/chiffres.php');
include_once(FWK_PATH.'common/dates.php');
include_once(FWK_PATH.'common/curl.php');
include_once(INCLUDE_PATH.'insee/classMInsee.php');
include_once(FWK_PATH.'mail/sendMail.php');
global $iDb;
//$iDb=new WDB('jo');
$str=file_get_contents('/root/kompass/French Contacts Part 1.txt');
die(strlen($str));
?>