#!/usr/bin/perl require "data.pl"; foreach $SELO (sort keys %database) { $SELOFILE = "$SELO"."_URLS_ALL"; if (-e $SELOFILE) { next; }; print "Generating $SELOFILE....\n"; $ST = 1; $SELO_BG = ( split('\:',$database{$SELO}) )[0]; $KREG = ( split('\:',$database{$SELO}) )[1]; open FILE, ">$SELOFILE"; for ($i=10; $i<=39; $i++) { $b1 = ( split('\:',$bukva{$i}) )[0]; for ($r=10; $r<=39; $r++) { $b2 = ( split('\:',$bukva{$r}) )[0]; $dir = $SELO; $out_file = "$SELO$i$r"."_"."$ST"; $the_file = $dir . "/" . $out_file; if (! -e $the_file) { next; }; print FILE "http://db.infotel.bg:8889/phone/plsql/Viewfi0?ST=$ST&KREG=$KREG&FIR=$b1$b2&SEL=&CSEL=$SELO_BG&CADDRESS=&ekod_ul=&rad=0;$dir;$out_file\n"; @extr = `./extract.pl $the_file`; $count = pop @extr; chomp $count; if ($count != 0) { $pages = ($count - ($count % 10)) / 10; for ($f=1; $f<=$pages; $f++) { $page = ($f*10)+1; $out_file = "$SELO$i$r"."_"."$page"; print FILE "http://db.infotel.bg:8889/phone/plsql/Viewfi0?ST=$page&KREG=$KREG&FIR=$b1$b2&SEL=&CSEL=$SELO_BG&CADDRESS=&ekod_ul=&rad=0;$dir;$out_file\n"; }; }; }; }; close FILE; };