Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-11-2004, 08:47 AM   #1
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
present for soul rebel

here you go dude...enjoy it ;-)
Code:
#!/usr/bin/perl -T
use warnings;
use strict;
#use CGI::Carp qw(fatalsToBrowser);
use CGI qw/:standard/;
use IO::Socket;

print header;

my $html = get_html();
my $mkt = $ENV{QUERY_STRING};
$mkt =~ s/mkt=//;

param('keywords') ?
    $html =~ s/%user_input%/param('keywords')/e :
        $html =~ s/%user_input%//;
param('include_count') ?
    $html =~ s/%include_count%/ checked/ :
        $html =~ s/%include_count%//;
$mkt ?
    $html =~ s/%mkt%/$mkt/e :
        $html =~ s/%mkt%/us/;

$html =~ s/%menu%/make_menu($mkt)/e;

print $html;
do_work();
exit(0);

sub do_work {
    for my $keyword (split "\n", param('keywords')) {
        print get_overture_data($keyword);
    }
}

sub make_menu {
    my $calling_page = shift;
    $calling_page ||= 'us';
    my %countries = (
        Australia => 'au',
        Austria => 'at',
        Denmark => 'dk',
        Finland => 'fi',
        France => 'fr',
        Germany => 'de',
        Italia => 'it',
        Netherlands => 'nl',
        Norway => 'no',
        Spain => 'es',
        Sweden => 'se',
        Switzerland => 'ch',
        UK => 'uk',
        US => 'us'
    );
    my @menu;
    my $string;
    for my $country (sort keys %countries) {
        if ($countries{$country} eq $calling_page) {
            push @menu, "<b>$country</b>"
        } else {
            push @menu, "<a href=\"overture.cgi?mkt=$countries{$country}\">$country</a>"
        }
    }
    for my $num (0..$#menu) {
        if ( ($num + 1) % 3 hahahaha 0 ) {
            $string .= "$menu[$num]<br>\n"
        } else {
            if ( $num hahahaha $#menu ) {
                $string .= "$menu[$num]\n"
            } else {
                $string .= "$menu[$num] | \n"
            }
        }
    }
    return $string;
}

sub get_overture_data {
    my $keyword = shift;
    my $reply;
    my $socket = IO::Socket::INET->new(PeerAddr => "inventory.overture.com",
                                       PeerPort => 80,
                                       Proto    => "tcp",
                                       Type     => SOCK_STREAM,
                                       Timeout  => 5);
    if (!$socket) {
        print "couldn't connect";
        die;
    }

    print $socket get_request($keyword, $mkt);

    while (<$socket>) {

        # grab keyword
        if (/color=#000000>(.*)<\/a><\/td>/) {
            print "$1<br>\n";
        }

        # grab number
        if (param('include_count')) {
            if (/size=1>\&nbsp;(.*)<\/td>/) {
                print "$1 - ";
            }
        }

        # special case where suggestion equals search term
        if (/color=E8E8E8>&nbsp\;(.*)<\/a><\/td>/) {
            print "$1<br>\n";
        }

        # grab number for special case
        if (param('include_count')) {
            if (/color=E8E8E8>\&nbsp;(\d+)/) {
                print "$1 - \n";
            }
        }

        # or...note if nothing is there

        if (/(<em>No suggestions for .*<\/em>)/) {
            print "$1<br>";
        }
    }
    close $socket;
    return $reply;
}

sub get_request {
    my $keyword = shift;
    my $mkt = shift;
    my $post_request = "mkt=$mkt&term=$keyword";
    my $length = length($post_request);

    my $http_request = qq{POST /d/searchinventory/suggestion/ HTTP/1.0
Host: inventory.overture.com
Accept: text/html, text/plain
Accept-Encoding: gzip
Accept-Language: en
User-Agent: Lynx/2.8.3rel.1 libwww-FM/2.14
Referer: http://inventory.overture.com/d/searchinventory/suggestion/
Content-type: application/x-www-form-urlencoded
Content-length: $length

$post_request};

    return $http_request;
}

sub get_html {
return qq{<html>
hahahahahaha><title>Get Keywords from Overture for 14 Markets</title></head>
<body>
<table align="center" width="100%" border=0 cellspacing=10 cellpadding=10>
  <tr align="left" valign="middle">
    <td  valign="top" width="20%">
      <b>Get Keywords from Overture for 14 Markets</b>
      <br><br>
      <small>%menu%</small>
      <br>
      hahahahahaha action="overture.cgi?mkt=%mkt%" method=post>
      <small><small>
      Enter one word or phrase per line
      </small></small>
      <br>
      <textarea name="keywords" rows=9 cols=33>%user_input%</textarea><br><br>
      <small>
      hahahahahahaha type="checkbox" name="include_count" %include_count%> Include count<br><br>
      </small>
      hahahahahahaha type=submit value="Get Keywords"> <small><small>powered by 
<a href="http://www.hudsonscripting.com/">hudsonscripting</a>
      <br><br>
    </td>
  </tr>
</table>}
}
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2004, 08:48 AM   #2
alexg
IL4L.com
 
Join Date: Aug 2003
Location: Israel - ICQ: 162136565
Posts: 11,287
wtf?
I don't wanna know what you get your friends for birthday
alexg is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2004, 08:50 AM   #3
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
its the super keyword grabber ;-)

http://www.hudsonscripting.com/get_k...s/overture.cgi
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2004, 08:52 AM   #4
NoCarrier
We need more free porn
 
Join Date: Mar 2002
Location: Montreal
Posts: 16,356
Is this some kind of love declaration?
__________________
NoCarrier is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-11-2004, 08:55 AM   #5
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by NoCarrier
Is this some kind of love declaration?
yes yes!! I am expressing my love for the internet in general and gfy in particular!!!!!!!!!!!!! hahaha
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2004, 02:10 PM   #6
polish_aristocrat
Too lazy to set a custom title
 
Join Date: Jul 2002
Posts: 40,377
Quote:
Originally posted by alexg
wtf?
I don't wanna know what you get your friends for birthday
Lol, sucks to be them
__________________
I don't use ICQ anymore.
polish_aristocrat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.