Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Tournament Poker > One-table Tournaments
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-02-2005, 02:27 AM
swiftrhett swiftrhett is offline
Member
 
Join Date: Jul 2005
Posts: 61
Default Eurobet Email Source Code (if your use PERL)

I wasn't about to save all my eurobet messages to a file one by one, so I wrote a perl script that just gets them and emails them all to my gmail account. I modifyed the script a little to take out my info, so you need to put your own in if you use this.

If any of you use linux, this should be easy to set up, if you use windows, you can get this running with Activestate PERL (free).

Anyway, here is the script:
#!/usr/bin/perl

use Net::SMTP;
use Net::Config;
use WWW::Mechanize;

#Enter your EUROBET USER/PASS in the quotes

my $EUROBET_USERID='';
my $EUROBET_PASSWORD='';
#################
##
##Enter your email info below
##
my $mech = WWW::Mechanize->new();

$mech->get( 'http://www.eurobet.com/sb.go?page=index&lang=1&sid=1&ms=MS');

$mech->submit_form(
form_name => 'LoginForm',
fields => {
username => $EUROBET_USERID,
password => $EUROBET_PASSWORD,
}
);
if ($mech->content =~ /\"http\:\/\/.*?\&sid=(\d*)\&ms\=MS\"\)\;/){

$mech->get ( 'https://wp.eurobet.com/payeci.go?stage=40000&splash=1&dummy=0&amp ;mstage=1&channel=sb=slang=1&sid='. $1.'&ms=MS');

my @messages = $mech->content =~ m/\<a href\=(payeci\.go\?stage\=\d+\&mstage\=\d+\&am p;sid=\d+\&lang\=1\&ms\=MS\&channel\=s b\=slang\=\d+\&msgpos\=\d+\&msgid\=\d+\&am p;inbox\=\d+) clas/gi;
print scalar @messages;
for my $message (@messages){
$mech->get ('https://wp.eurobet.com/' . $message);
$mech->follow_link ( text_regex =>qr/history/i);
if ($mech->content =~ /(Tournament \#\d+)/){
$subject = 'Eurobet ' . $1;
}
###ENTER EMAIL INFO HERE
###

##Your SMTP Server
$smtp=Net::SMTP->new('YOUR_SMTP_SERVER_HERE');

##Your Email "FROM" Address
$smtp->mail('youremail@yourdomain.com');

##YOUR Email "TO" Address
$smtp->to('Desinationaddress@yourdomain.com');
$smtp->data();

##ENTER Again, leave the slashes in
$smtp->datasend("From: you\@yourdomain\.com\n");
$smtp->datasend("To: youremail\@yourdomain\.com\n");
$smtp->datasend("Subject: Hand History from PartyPoker.com $subject \n");
$smtp->datasend("\n");
$smtp->datasend($mech->content);
$smtp->dataend();
$smtp->quit;
}
}
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.