1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
|
if ( $step == "getfile" ) {
/* Datei laden */
$download = file_put_contents( 'temp/IpToCountry.zip', file_get_contents( 'http://software77.net/geo-ip/?DL=2' ) );
if ( $download < 10000 ) {
print "<br>Der Download ist fehlgeschlagen.<br>\n";
print "<br>Bitte später noch mal versuchen.<br>\n";
@unlink( 'temp/IpToCountry.zip' );
print "</td></tr></table></body></html>";
exit;
}
/* ZIP-Datei lesen */
$datei_name = 'temp/IpToCountry.zip';
$zip = zip_open( $datei_name );
if ( $entry = zip_read( $zip ) ) {
zip_entry_open( $zip, $entry, 'r' );
$csv = zip_entry_read( $entry, zip_entry_filesize( $entry ) ); |