Two Plus Two Older Archives  

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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 08-02-2005, 02:28 AM
citanul citanul is offline
Member
 
Join Date: Jul 2003
Posts: 64
Default Re: Eurobet Email Source Code (if your use PERL)

can someone who cares enough to read this post tell me if this script will just send your id and passsword to the script's author?

citanul
Reply With Quote
  #3  
Old 08-02-2005, 04:33 AM
tigerite tigerite is offline
Senior Member
 
Join Date: Sep 2004
Posts: 360
Default Re: Eurobet Email Source Code (if your use PERL)

Nah, it looks legit.
Reply With Quote
  #4  
Old 08-02-2005, 04:36 AM
tshort tshort is offline
Senior Member
 
Join Date: May 2005
Posts: 237
Default Re: Eurobet Email Source Code (if your use PERL)

Nice.
Reply With Quote
  #5  
Old 08-02-2005, 07:15 AM
codewarrior codewarrior is offline
Member
 
Join Date: Sep 2002
Location: Mentor, OH, USA
Posts: 79
Default Re: Eurobet Email Source Code (if your use PERL)

Only if you type in the author's email addy for him. Looks good.
Reply With Quote
  #6  
Old 08-02-2005, 09:26 AM
1C5 1C5 is offline
Senior Member
 
Join Date: Oct 2004
Location: Hippo Island, South Pacific
Posts: 846
Default Re: Eurobet Email Source Code (if your use PERL)

This would be great. Can you please, please help me. I have no clue how to do this, what program I have to download (I use Windows XP) but I would be forever grateful. I waste 15 min a day copying the HH one by one onto my computer from Eurobet.
Reply With Quote
  #7  
Old 08-02-2005, 09:45 AM
tigerite tigerite is offline
Senior Member
 
Join Date: Sep 2004
Posts: 360
Default Re: Eurobet Email Source Code (if your use PERL)

I'm going to try to knock something up to call this code, give me a little while.
Reply With Quote
  #8  
Old 08-02-2005, 09:56 AM
1C5 1C5 is offline
Senior Member
 
Join Date: Oct 2004
Location: Hippo Island, South Pacific
Posts: 846
Default Re: Eurobet Email Source Code (if your use PERL)

Ok, thanks.

Please make it simple so a computer dummy like me can do it.
Reply With Quote
  #9  
Old 08-02-2005, 10:21 AM
tigerite tigerite is offline
Senior Member
 
Join Date: Sep 2004
Posts: 360
Default Re: Eurobet Email Source Code (if your use PERL)

ActiveState Perl doesn't come with WWW::Mechanize. Can't do it as it stands.

Ok, I found it on a web search. Back on with it.
Reply With Quote
  #10  
Old 08-02-2005, 03:09 PM
swiftrhett swiftrhett is offline
Member
 
Join Date: Jul 2005
Posts: 61
Default Re: Eurobet Email Source Code (if your use PERL)

One problem with making this super easy for computer boneheads is that they still need to enter an SMTP server to send the email. I use the SMTP server that comes with my cable internet.

I have made perl scripts easy to run for clients in the past by putting my script, activestate perl, and the modules in a single directory. Then I write a batch file to simply run the script, and the client can just click on the batch file icon. It's kind of a pain to set up through. Good luck, tigerite
Reply With Quote
Reply


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 01:54 PM.


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