Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Help me with this php

Name: Anonymous 2006-04-07 10:54


It is in a funny syntax that doesn't work with my version of php

use HTML::TokeParser;
use LWP::UserAgent;
use HTTP::Response;
my $prefix = "x";

my $agent = LWP::UserAgent->new;
my $get = 'http://uh-oh.com/main.htm';;
if ($ARGV[0] eq "-v") {
        $get = 'http://www.thevidvault.com/';;
        $prefix = "v$prefix";
}
my $response = $agent->get($get);

my $content = $response->content;
my $parser = HTML::TokeParser->new(\$content);
if (!$parser) { die "Parse Not Alive?"; }
my @urls = ();
while (my $token = $parser->get_token) {
        if ($token->[0] eq "S") {
                if (lc($token->[1]) eq "a") {
                        my $url = $token->[2]->{href},"\n";
                        my $text = $parser->get_trimmed_text("/a");
                        ##if ($url =~ /thumb.*url=(.*)$/) {
                        if ($text =~ /\((\d)+\)/) {
                                print $text,$/;
                                push @urls,$url;
                        }
                }
        }
}
my $max = 20;
my $fileseach = scalar(@urls)/$max;
foreach (1..$fileseach) {
        open(FILE,">".getName($_));
        print FILE join("\n",@urls[(($_-1)*$max)..(($_)*$max)]),"\n";
        close(FILE);
}
foreach (1..$fileseach) {
        my $str = "wget -r -np -i ".getName($_)." &";
        print "$str\n";
        my $k = fork();
        unless ($k) {
                exec($str);
        }
}
sub getName {
        my $number = shift;
        return "./${prefix}${number}.urls";
}

Name: Anonymous 2006-04-07 11:30 (sage)

I look forward to the day when you find out that it's not PHP at all.

Name: Anonymous 2006-04-07 12:12

I was scrolling down quickly and suddenly shuddered at the sight of something really ugly.

I proceeded to scroll back with a tad of fear at the possible impact to my eyes.

Then I saw it. I stumbled upon a horrible combination of of ::, my, lack of parenthesis, and oneliners made my mind cringe.

It was Perl.

Name: Anonymous 2006-04-07 13:07 (sage)

>>1
It's not PHP, it's Rebol!

Name: Anonymous 2007-07-28 7:09 ID:heOEGn94

EXPERT PROGRAMMER

Name: Anonymous 2007-07-28 7:31 ID:Heaven

>>5
Fuck you

Name: Anonymous 2007-07-28 7:33 ID:iC3zSdDV

>>1
It's not PHP, it's /#$%(")/)=#%(/"#)%(/%/=%&).

Also,
if ($text =~ /\((\d)+\)/) {
Lol. Loose typed languages are shitty, and Perl in this is no better than PHP. But in this particular case, the use of the "text" name for the variable turns me on. It has to be written by a web designer.

Name: Anonymous 2007-07-28 8:00 ID:Heaven

>>7
and you

Name: Anonymous 2007-07-28 9:13 ID:oJDADtGX

>>7
What? There's something wrong with calling variables 'text' now?

Name: Anonymous 2007-07-28 9:25 ID:Heaven

>>9
Absolutely nothing, also good variable names are 'data', 'stuff', 'shit', 'something' and while we are at it let me suggest some nice names for functions 'doit', 'doShit', 'process', 'start'.

Name: Anonymous 2007-07-28 14:58 ID:em0RfLBK

>>10 prefers ForumBoardThreadReplyCommentTextHandlerFactory::makeForumBoardThreadReplyCommentTextFromForumBoardThreadReplyID($forumBoardThreadReplyID)

Name: Anonymous 2007-07-28 17:05 ID:xgMoyB0j

$get = 'http://www.thevidvault.com/';;;

why the double semicolon? I've heard that does nothing really but is that true? Is this person doing something with it?

Name: Anonymous 2007-07-28 17:07 ID:xgMoyB0j

$get = 'http://www.thevidvault.com/';;;;

It's turned into 3 now..

Name: Anonymous 2007-07-28 17:18 ID:Heaven

';

Name: Anonymous 2007-07-28 17:19 ID:Heaven

Name: Anonymous 2007-07-28 17:19 ID:Heaven

>12,13

SHIICHAN IS KINDA SHIITY GUYSE.

Name: Anonymous 2007-07-28 17:20 ID:5F+Whxsn

"';" at then end of a url turns into "';;".
lol php.

Name: Anonymous 2007-07-28 17:22 ID:Heaven

the obvious solution is to use code tags. like so:
$get = 'http://www.thevidvault.com/';;

Name: Anonymous 2007-07-28 17:23 ID:Heaven

>>18
ok, i guess shiichan is kinda shitty.

Name: Anonymous 2007-07-28 17:38 ID:svdbNSTY

>>19
NO SHIT

Name: Anonymous 2007-07-28 17:54 ID:ZY46yP8z

Okay the obvious solution is
$get = 'http://www.thevidvault.com/';

Name: Anonymous 2007-07-28 18:24 ID:KkGRdTuP

>>21
An even more obvious solution is
http://wakaba.c3.cx/releases/kareha_3.1.3.zip

Name: Anonymous 2007-07-29 1:02 ID:rhSYepK/

AddType application/x-httpd-cgi .php

That'll fix your problem.

Name: Anonymous 2007-07-29 1:04 ID:rhSYepK/

>>23 put that in a .htaccess file, btw.

Name: Anonymous 2007-07-29 1:07 ID:jh85/WN8

>>10
yes, they are good names, excep fot doIt, lol camelcase. Are you php programmer?

Name: Anonymous 2007-07-29 5:29 ID:e32w7MaE

>>25
CamelCase > shitCase

are you a Java programmer?

Name: Anonymous 2007-07-29 5:52 ID:IwChJOAx

>>26
Truth

Name: Anonymous 2007-07-29 6:03 ID:o/qqRUqg

>>26
Are you a Visual Basic programmer?

Name: Anonymous 2007-07-29 6:34 ID:Heaven

>>26
sulkingCamelCase is faster, discussion over.

Name: Anonymous 2007-07-29 9:44 ID:IwChJOAx

                             __
               ---_ ...... _/_ -
              /  .      ./ .'*\ \
              : '         /__-'   \.
             /                      )
           _/                  >   .'
        /   .   .       _.-" /  .'
         \           __/"     /.'/|
          \ '--  .-" /      //' |\|    //`'''`'''',
            \|..\ |/Oo.   //_ _ |/|   // CamelCase `.,
           .'    \:____.,/|_ _ _|\|  //',,,.'``.,,.'
         / _____  \___/.' | _ _ |/| //
         | / ||  \\---\|  \ _ _ \\\//
         ||  ||   \\  ||   \ _ _ \|\
         co  co    co co

Name: Anonymous 2007-07-29 10:56 ID:TaZBTqxP

>>29
VROOM VROOM

Name: Anonymous 2011-01-31 20:38

<-- check em dubz

Name: Anonymous 2011-02-04 11:39

Name: Anonymous 2011-02-04 14:39

Don't change these.
Name: Email:
Entire Thread Thread List