![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
|
![]() 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>\ (.*)<\/td>/) { print "$1 - "; } } # special case where suggestion equals search term if (/color=E8E8E8> \;(.*)<\/a><\/td>/) { print "$1<br>\n"; } # grab number for special case if (param('include_count')) { if (/color=E8E8E8>\ (\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>} } |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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
__________________
Find fuck buddies in your area! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
We need more free porn
Join Date: Mar 2002
Location: Montreal
Posts: 16,356
|
Is this some kind of love declaration?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Too lazy to set a custom title
Join Date: Jul 2002
Posts: 40,377
|
Quote:
![]()
__________________
I don't use ICQ anymore. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |