Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use LWP;
- $| = 1;
- my $file = "voice.mp3"; # mp3-файл
- my $image = "graph.png"; # png-картинка
- my $count = 60; # Сколько штук загрузить, можно вставлять до 60 в один пост.
- my $lwp = new LWP::UserAgent;
- for(1..$count) {
- my $response = $lwp->post("http://www.0chan.ru/voice.php",
- Content_Type => "form-data",
- Content => [voice => [$file], visual => [$image]],
- );
- if($response->content() =~ /done:(\w+)/) {
- print "[voice=$1]\n";
- } else {
- print $response->content();
- }
- sleep 1 if $_ < $count;
- }
Advertisement
Add Comment
Please, Sign In to add comment