For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > August 2006 > Accessing Clickbank Data









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Accessing Clickbank Data
Mike Blezien

2006-08-25, 9:56 pm

Hello,

we are trying to setup an remote system to obtain account data records for our
client, which can be exported out as HTML or CSV file. The problem is after the
script remotely logs in, clickbank system sets a encrypted cookie called 'token'
for secure connections only.

we pass the initially login string like such:
https://login.clickbank.net/login/?....com/login.html
&nick=<USERNAME>&pass=<PASSWORD>

then after the string has been submitted remotely, we need to execute the next
string to obtain the account data records for a specific date range, like such:
https://login.clickbank.net/orders/...ail=&format=csv

then the data is processed into the client's database. The clickbank account is
owed by the client and has the proper login data to log in.

But the problem is without this token value(a secure cookie) to pass to their
system, it fails. I assume this is for security reasons ... obviously. I was
hoping that someone maybe fimilar with Clickbank and may know of way to safely
obtain the export data in this manner.

We are using the LWP to execute the remote string, but their may be a better way
to do this.

Any suggestion or help would be much appreciated.

Mike(mickalo)Blezien
===============================
Thunder Rain Internet Publishing
Providing Internet Solution that Work
===============================

Tom Phoenix

2006-08-26, 6:57 pm

On 8/25/06, Mike Blezien <mickalo@frontiernet.net> wrote:

> we are trying to setup an remote system to obtain account data records for our
> client, which can be exported out as HTML or CSV file. The problem is after the
> script remotely logs in, clickbank system sets a encrypted cookie called 'token'
> for secure connections only.


> We are using the LWP to execute the remote string, but their may be a better way
> to do this.


WWW::Mechanize is built atop LWP, so you shouldn't have to change your
code much.

http://search.cpan.org/~petdance/WWW-Mechanize/

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training
Mike Blezien

2006-08-26, 6:57 pm

Tom,

----- Original Message -----
From: "Tom Phoenix" <tom@stonehenge.com>
To: "Mike Blezien" <mickalo@frontiernet.net>
Cc: "Perl List" <beginners@perl.org>
Sent: Saturday, August 26, 2006 1:59 PM
Subject: Re: Accessing Clickbank Data


> On 8/25/06, Mike Blezien <mickalo@frontiernet.net> wrote:
>
>
>
> WWW::Mechanize is built atop LWP, so you shouldn't have to change your
> code much.
>
> http://search.cpan.org/~petdance/WWW-Mechanize/
>
> Hope this helps!


The problem is retrieving the cookie it sets after the initial login, called
'token'. Without this, we can't obtain the account data. That's the part I
haven't figured out yet.

We can use the WWW::Mechanize module to similuate the login form, no problems
there, it's just the next step to obtain the cookie it sets ... or if it's even
possible to do.

Thx's

Mickalo

Tom Phoenix

2006-08-26, 6:57 pm

On 8/26/06, Mike Blezien <mickalo@frontiernet.net> wrote:

> We can use the WWW::Mechanize module to similuate the login form, no problems
> there, it's just the next step to obtain the cookie it sets ... or if it's even
> possible to do.


The cookie jar is implemented with HTTP::Cookies.

http://search.cpan.org/~petdance/WW...WW/Mechanize.pm
http://search.cpan.org/~gaas/libwww...HTTP/Cookies.pm

Is that what you needed? Cheers!

--Tom Phoenix
Stonehenge Perl Training
Mike Blezien

2006-08-26, 6:57 pm

Tom,

got it working prefectly now with WWW::Mechanism :) The cookie wasn't actually
really needed.

Appreciate the help

Mike
----- Original Message -----
From: "Tom Phoenix" <tom@stonehenge.com>
To: "Mike Blezien" <mickalo@frontiernet.net>
Cc: "Perl List" <beginners@perl.org>
Sent: Saturday, August 26, 2006 3:52 PM
Subject: Re: Accessing Clickbank Data


> On 8/26/06, Mike Blezien <mickalo@frontiernet.net> wrote:
>
>
> The cookie jar is implemented with HTTP::Cookies.
>
> http://search.cpan.org/~petdance/WW...WW/Mechanize.pm
> http://search.cpan.org/~gaas/libwww...HTTP/Cookies.pm
>
> Is that what you needed? Cheers!
>
> --Tom Phoenix
> Stonehenge Perl Training
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com