![]() |
![]() |
![]() |
||||
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: 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 ! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Join Date: Nov 2005
Location: NYC ICQ: 320970274
Posts: 2,051
|
Code:
if (/countryMatch=([^;]+)/) { $match = $1; } |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
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; |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
perverted justice decoy
Join Date: Aug 2005
Location: unborn still in the womb connected via blackberry
Posts: 19,291
|
![]()
__________________
my sig caught gonoherpasyphilaids and died ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Jun 2003
Posts: 1,697
|
Quote:
Awesome ! ![]() Thanks a lot ! ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Registered User
Join Date: Nov 2005
Location: NYC ICQ: 320970274
Posts: 2,051
|
always happy when something works ;-)
|
![]() |
![]() ![]() ![]() ![]() ![]() |