1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Little How to: Use LWP::Simple to get ads to show up in perl scripts.

Discussion in 'Co-op Advertising Network' started by Nintendo, Nov 2, 2005.

  1. #1
    Here's a simple way to get ads to show up in perl files, using LWP::Simple. (php is still required.)

    In each ### below, enter the number thats in the main files.

    Create an ad_network_###_perl.php file with
    
    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network_###.php');
    	echo $ad_network;
    ?>
    
    PHP:
    Then for the perl script...
    
    #!/usr/bin/perl
    
    #Get the co-op page
    use LWP::Simple;
    $dpcoop = get ('http://www.domain_URL_TO_FILE_YOU_MADE.com/ad_network_###_perl.php');
    {
    
       print "Content-Type: text/html\n\n";
    print <<EOM;
    
    $dpcoop
    
    EOM
       exit;
    }
    
    Code (perl):
    In your current script, all you probably have to do is place
    
    use LWP::Simple;
    $dpcoop = get ('http://www.domain_URL_TO_FILE_YOU_MADE.com/ad_network_###_perl.php');
    
    Code (perl):
    in it and add

    $dpcoop in a template (in the script) where you place code that shows up on the site.
    SEMrush
     
    Nintendo, Nov 2, 2005 IP
    SEMrush
  2. sftranna

    sftranna Member

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #2
    Simply use
    my $ua = LWP::UserAgent->new();
    my $response = $ua->post( $url, { 'id' => $serviceID } );
    my $content = $response->decoded_content();



    a nice and simple way describe in a memcache tut below
    eaziweb dot blogspot dot com /2012/10/memcached-using-php-and-perl.html
     
    sftranna, Oct 22, 2012 IP