QR-Codes win mostly

QR-Codes win, mostly.
www.Weinwerbung.Tel
qrcode

Triest Transport

www.Triest.Tel



Friday 25 December 2009

How to place advertising with Perl and WebService-Telnic module (Solution for Linux and Mac OS)



Telnic forum. Thread about advertising within .tel, for Linux and Mac OS:
Quote:

It looks like WebService-Telnic module from Peter Makholm is working.

Here is small KNOW-HOW, on how to place advertising on Dot Tel domain by using Perl, although part is hand made, part with Perl.

1. Use the supplied small script, where you will change on bottom the advertising title, URL, description and position priorities.

2. Run the script like this:
perl tel-putads2.pl -domain=yourdomainhere.tel -user=Z12345678 -pass=123pass111

Soon, you will be enjoying the placement of advertising on your Dot Tel, like here shown http://adresar.tel

If you need help, let me know, and I can help you on this simple task.

I don't know, but for some reason I really like Dot Tel. It has search engine power, and most of all, you don't need nothing but domain to run it.

-------------------

Who is on Mac or Linux, opens up terminal, and run the updated script attached below like this:

perl tel-putads2.pl -domain=example.tel -user=MyNameHere -pass=Incorrect -adtitle="Here comes the Blue Title" -adgreen="www.greenurl.com" -adurl="http://www.example.com" -addesc="Text description with not that much text." -position=bottom

This is not run over website. It is run locally on the computer. This script does not delete previous ads, it simply ads new advertising. Position can be specified as top, bottom or right.




--------------------

#!/usr/bin/perl

use strict;
use warnings;

use WebService::Telnic::Client;
use WebService::Telnic::Client::RR;
use List::Util qw(shuffle);
use Getopt::Long;

my ($endpoint, $domain, $user, $pass);
GetOptions(
'endpoint=s' => \$endpoint,
'domain=s' => \$domain,
'user=s' => \$user,
'pass=s' => \$pass,
);

die 'domain, user, and pass is all needed' unless
$domain && $user && $pass;

my $client = WebService::Telnic::Client->new(
endpoint => $endpoint,
domain => $domain,
user => $user,
pass => $pass,
);

my $qotd;

$qotd = WebService::Telnic::Client::RR->new(
type => 'TXT',
name => $domain,
owner => '_ad'
);

# Net::DNS::RR::TXT doesn't have a nice accessor?
$qotd->{'char_str_list'} = [
".tad", "1", "1", "1", "Thetabiz™ Offshore Services", "www.offshore-services.biz", "uri", "http://www.offshore-services.biz", "desc", "Global corporate registration provider with banking and financial resources."
];

$client->storeRecord($qotd);


-------------------------------------------


------------------------

#!/usr/bin/perl

use strict;
use warnings;

use WebService::Telnic::Client;
use WebService::Telnic::Client::RR;
use List::Util qw(shuffle);
use Getopt::Long;

my ($endpoint, $domain, $user, $pass, $adtitle, $adgreen, $adurl, $addesc, $position, $priority);
GetOptions(
'endpoint=s' => \$endpoint,
'domain=s' => \$domain,
'user=s' => \$user,
'pass=s' => \$pass,
'adtitle=s' => \$adtitle,
'adgreen=s' => \$adgreen,
'adurl=s' => \$adurl,
'addesc=s' => \$addesc,
'position=s' => \$position,
'priority=s' => \$priority
);

die 'domain, user, and pass is all needed' unless
$domain && $user && $pass;

if($position) {
unless($position ne 'top' or $position ne 'bottom' or $position ne 'right') {
die "Position not defined.\n";
} else {
if($position eq 'top') { $position = 1; }
if($position eq 'right') { $position = 2; }
if($position eq 'bottom') { $position = 3; }
}
} else {
$position = '1';
}

if($priority) {
unless($priority > 0 ) {
die "Priority not defined.\n";
}
} else {
$priority = '1';
}

my $client = WebService::Telnic::Client->new(
endpoint => $endpoint,
domain => $domain,
user => $user,
pass => $pass,
);

my $advert;

$advert = WebService::Telnic::Client::RR->new(
type => 'TXT',
name => $domain,
owner => '_ad'
);

print ".tad 1 $position $priority $adtitle $adgreen uri $adurl desc $addesc\n";
;
# Net::DNS::RR::TXT doesn't have a nice accessor?
$advert->{'char_str_list'} = [
".tad", "1", $position, $priority, $adtitle, $adgreen, "uri", $adurl, "desc", $addesc
];

$client->storeRecord($advert);

------------------------------------------

Source:
Telnic forum:
http://www.telnic.com/forum/showthread.php?t=464
.
.