Perl experts ? Here is another one...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CHMOD
    Confirmed User
    • Jun 2003
    • 1697

    #1

    Perl experts ? Here is another one...

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

    This link :

    https://www.maxmind.com/app/ccv2r?i=...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 !
    Sell our Silicone Dolls and make big money!

    Our website:
    https://www.sexdolls-shop.com/

    Signup:
    http://www.sexdollscash.com/sliiing/registration.php

    Contact:
    [email protected]
  • Spider Ninja
    Registered User
    • Nov 2005
    • 2051

    #2
    Code:
    if (/countryMatch=([^;]+)/) {
        $match = $1;
    }

    Comment

    • Spider Ninja
      Registered User
      • Nov 2005
      • 2051

      #3
      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;

      Comment

      • BusterBunny
        perverted justice decoy
        • Aug 2005
        • 19291

        #4
        my sig caught gonoherpasyphilaids and died

        Comment

        • CHMOD
          Confirmed User
          • Jun 2003
          • 1697

          #5
          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 !
          Sell our Silicone Dolls and make big money!

          Our website:
          https://www.sexdolls-shop.com/

          Signup:
          http://www.sexdollscash.com/sliiing/registration.php

          Contact:
          [email protected]

          Comment

          • Spider Ninja
            Registered User
            • Nov 2005
            • 2051

            #6
            always happy when something works ;-)

            Comment

            Working...