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
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network_###.php');
    	echo $ad_network;
    Then for the perl script...
    #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;
    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.
    Nintendo, Nov 2, 2005 IP
  2. sftranna

    sftranna Member

    Likes Received:
    Best Answers:
    Trophy Points:
    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