Detail: backlinks.com -> perl (text)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# ********************************************************************
# Paste this block of code on your web page where you would like text 
# links to be displayed. This code will dynamically add and remove text 
# links on your web page according to your BackLinks.com settings.
# ********************************************************************

# The following variable defines whether links are opened in a new window
# (1 = Yes, 0 = No)
my $OpenInNewWindow = "1";

# ********************************************************************
# Please DO NOT modify anything below
# ********************************************************************

my $BLKey = "THIS-IS-THE-KEY";

use LWP::Simple;
use URI::Escape;

my $QueryString;

$QueryString  = "LinkUrl=".uri_escape((($ENV{'HTTPS'} eq 'on')?'https://':'http://').$ENV{'HTTP_HOST'}.$ENV{'REQUEST_URI'});
$QueryString .= "&Key=" .uri_escape($BLKey);
$QueryString .= "&OpenInNewWindow=" .uri_escape($OpenInNewWindow);

#Make request
my $backlinks_content = get("http://www.backlinks.com/engine.php?".$QueryString);

if($backlinks_content) {
    print $backlinks_content;
}

[raw] - Pasted by: r0sk on text on May 11, 2011