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 Mark Forums Read
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 02-23-2006, 10:22 PM   #1
CHMOD
Confirmed User
 
CHMOD's Avatar
 
Join Date: Jun 2003
Posts: 1,697
Perl experts ? Here is another one...

I am slowly learning Perl... I can't figure out this one :

This link :

http://www.maxmind.com/app/ccv2r?i=2...CENSE_KEY_HERE

Returns a response on a webpage. A blank webpage with a string printed on the top of the page. It doesn't return a string.... It returns a webpage with a string printed on it.

Something like this :

distance=10;countryMatch=no;countryCode=US;freeMail=no; etc etc...

Now... What lines can pick up the answer of...let's say countryMatch ? ( On my example, the answer is "no" )

How can I pick up the answer of countryMatch and print it on my screen ?



Thanks !
CHMOD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2006, 10:25 PM   #2
Spider Ninja
Registered User
 
Join Date: Nov 2005
Location: NYC ICQ: 320970274
Posts: 2,051
Code:
if (/countryMatch=([^;]+)/) {
    $match = $1;
}
Spider Ninja is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2006, 10:30 PM   #3
Spider Ninja
Registered User
 
Join Date: Nov 2005
Location: NYC ICQ: 320970274
Posts: 2,051
well, something like:

Code:
#!/usr/bin/perl
use strict;
use LWP::Simple;

my $url = "http://www.domain.com/page.html";

my $html = get($url);

my $match;

if ($html =~ /countryMatch=([^;]+)/) {
    $match = $1;
}

print $match;
Spider Ninja is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2006, 10:32 PM   #4
BusterBunny
perverted justice decoy
 
BusterBunny's Avatar
 
Join Date: Aug 2005
Location: unborn still in the womb connected via blackberry
Posts: 19,291
__________________
my sig caught gonoherpasyphilaids and died
BusterBunny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2006, 07:03 AM   #5
CHMOD
Confirmed User
 
CHMOD's Avatar
 
Join Date: Jun 2003
Posts: 1,697
Quote:
Originally Posted by Spider Ninja
well, something like:

Code:
#!/usr/bin/perl
use strict;
use LWP::Simple;

my $url = "http://www.domain.com/page.html";

my $html = get($url);

my $match;

if ($html =~ /countryMatch=([^;]+)/) {
    $match = $1;
}

print $match;


Awesome !


Thanks a lot !
CHMOD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2006, 08:10 AM   #6
Spider Ninja
Registered User
 
Join Date: Nov 2005
Location: NYC ICQ: 320970274
Posts: 2,051
always happy when something works ;-)
Spider Ninja 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
Thread Tools



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.