Visual Vision **User's** Forum (normal) (https://www.paperinik.com/cgi-bin/eng/YaBB.pl)
Our Products >> EBooksWriter >> ebook calling home with user data at first open
(Message started by: Bill Park on Apr 15th, 2012, 2:48pm)

Title: ebook calling home with user data at first open
Post by Bill Park on Apr 15th, 2012, 2:48pm
I read from www.ebookswriter.com/checklist that the GOLD edition may ask username/email to the end user and send them to you (by script or by email)

what does this mean? I understand that if I check "custom password for each user", when the user (say) Mark Closser mark.closser@gmail.com purchases an ebook, with ebookswriter I "generate" a personal password for him (say it will be QRWGdasdW), I send this to him, and this password will work for Mark Closser mark.closser@gmail.com  and for him only

you explained that this is possible because the ebook asks to the user to enter his data (so the ebook will be able to "match" user and password)


so what "may ask username/email to the end user and send them to you (by script or by email)" does mean?


Title: Re: ebook calling script with user data at first o
Post by Support Staff on Apr 15th, 2012, 2:56pm
Yes, at start (when the ebook is opened the first time), either the ebooks created with the PRO or the GOLD will ask username and email if the ebook has been protected with "custom password for each user" ("custom password for each user"activated in the menu Hypertext / Passwords).

the GOLD additionally can SEND these data by email to to a Perl or PHP script on your server.

**
Tech explain: At the first time the user opens your ebook, the ebook itself calls your server and one script on your server with GET method, passing user name and email as parameters; you can specify (at the creation time) the path of the script.

**
More plain words explain with example:
1) you (or a technician hired by you) creates a CGI script program on your server, and installs it on your server. A "script" is a program that can be Perl, PHP or other languages. This is not included, but the net is full of examples of CGI scripts that collects parameters and we can provide a Perl example if needed.

2) this script actually is a file on the server, say it is
/scripts/intelligentprogram.pl

3) at ebook creation time, in a box, you specify where the script is (this is called "script path"), e.g.
http://www.yoursite.com/scripts/intelligentprogram.pl
the ebook will memorize this path; and you place a check mark on the checkbox that enables the feature

4) now a user opens your ebook, then the internal ebook software will make (if I recall correctly) this call
http://www.yoursite.com/scripts/intelligentprogram.pl?first=Bill;&last=Park;&email=billxxyy@gmail.com
(we suppose Bill Park billxxyy@gmail.com is the user)

For test purpose, you can use this test path:
http://isthe.com/cgi-bin/whoami.cgi
if you insert this, create a test ebook, insert your data, EBW, if I recall correctly will make this call
http://isthe.com/cgi-bin/whoami.cgi?first=Bill;&last=Park;&email=billxxyy@gmail.com

5) the script (the program "intelligentprogram.pl" on your server) will "receive" this call, and can do whatever.
You can test this in Firefox (click the link below; the action performed by EBW automatically is equivalent to your click below; when you click below, you simulate EBW calling the test script "whoami.cgi" with parameters "Bill" "Park" "billxxyy@gmail.com")
http://isthe.com/cgi-bin/whoami.cgi?first=Bill;&last=Park;&email=billxxyy@gmail.com

this test script provided by a kind guy shows that the script received your data - see QUERY_STRING they are there. A script can do whatever, this particular script just prints the data that he has available (username, email and also the IP of the user and several other interesting things).

The script is called after requiring the user data and before showing the ebook content; then it is not called again - it is called again only in the event that the user terminates the stuff before inserting his name/email.


Please ignore this feature if you don't understand - server programming can't be explained in a few minutes.... sorry! :)



Visual Vision **User's** Forum (normal) » Powered YaBB 1 Gold - SP1!
YaBB © 2000-2001, XNull. All Rights Reserved.
This forum © 2001-2008 VisualVision and VisualVision Users