crystal said in this thread about selling 1000 passwords using ASP
Hi Sunnil,
I would like to know how to do this with PHP. I can always install and customize existing code, but I haven't had the time to learn to write it for myself. Does anybody have a snippet that will do this already made?
My server doesn't have ASP, I'm running on Red Hat...I guess that CGI would be ok too, but I actually prefer PHP. It's dynamic and can do other cool things that I have programmed into my pages - and I can't exactly name my pages with BOTH a php and a cgi extension, obviously.
<HTML> <HEAD> <TITLE>Sell a password</TITLE> </HEAD> <BODY> add some text here <? /* $x is in the URL query string */ if ( $x != "" ) { echo "Are you ready to buy a password?" ; echo "<BR><BR>" ; /* edit the next line to include your nickname and product number and name */ echo "<A HREF=http://www.clickbank.net/sell.cgi?link=nickname/1/Product_Name&x=" . $x ; echo ">Click here to buy password number " . $x ; echo "</A>" ; } else { echo "<FORM METHOD=GET ACTION=sellpassword.php>" ; echo "Enter the number of the password (1 to 1000) that you want to buy" ; echo "<INPUT MAXLENGTH=4 NAME=\"x\" SIZE=4>" ; echo "<BR><INPUT TYPE=SUBMIT VALUE=\"Buy Now\">" ; echo "</FORM>" ; } ?> add some text here </BODY> </HTML>
The above sells a single clickbank product, and passes x thru as a parameter to the thank you page. Edit the line which is marked
4. Make you thank you page, say thankyou.php
<HTML>. <HEAD> <TITLE>Thankyou</TITLE> </HEAD> <BODY> <? include "passwordlist.php" ;
/* $x is in the URL query string */
if ( $x != "" ) { echo "Your password is " . $passwordlist[$x] ; } else { echo "An error occured, contact the webmaster for help" ; } ?> add text here add text here </BODY> </HTML>
I'm in them middle of trying to get my new phpnuke installed this week, so I probably won't be able to do it until at least this weekend, but when I do, I'll definitely let you know how it works!
Glad to be of help. I'm sure it's right or very close (I didn't test)
I dunno if you noticed, but I used to use ASP for most stuff. Now i have changed all my sites, exceptwww.hits4me.comand part of domaincavern.com to PHP
Horrible job: But I got pretty good at turning ASP into PHP
Incidentally threre is also a program (DOS based) caused ASP2PHP which is out there on the net, freeware I think, that does a 90% conversion of ASP to PHP. You have to do some manual changes as well, but it works pretty good. I have to admit, I did NOT use this program, as I prefer to edit my code manually and know exactly what's happening.
Hi everybody, I am a real newbie and would like to know if somebody knows how to do this using cgi script (I mean manage 1000 passwords and have only one thank you page). Thanks for your reply. Denis
I'm a bit new to PHP, being more familiar with perl, so I'm having great fun with this
I've got the first part working OK and it is sending the correct parameters through to my merchant account, and the ordering page is fine. However, when the parameters come back to the thankyou / password page I get the full list of 1000 passwords!!!
Am I missing something? I assume that the passwordlist.php file is just a standard text file residing in the same directory as the other php files, with permissions set to 755.
I assume that the passwordlist.php file is just a standard text file residing in the same directory as the other php files, with permissions set to 755.
No it's PHP code. THe Edit Security dialog box has an option to generate this code - there is a Save as button there.
Now for hopefully my last query on this subject, my (registered) e-book compiler only seems to want to generate or import 500 passwords, not 1000. Why would this be?
Are you sure that they aren't there, and just not being displayed? or maybe you already had some present - 1000 is the total number? or maybe there's a gap in your the file you're (?) importing at line 500?.... gotta be something like that
OK I've checked this again - I have a list of 1000 passwords which will not import. I am absolutely certain that the file is exactly 1000 lines long, I've checked it in an html editor. If I remove one line so that there are 999 passwords, then it will import, and then I have to manually add the last one.
Sunil - perfection is one of those intangibles! However, if you find that you need an extra beta tester, I'd be more than happy to assist in the quest.
I will take you up on that, I will post here when I'm ready. I'll post here and email too.
4.10 is (mostly) to address annoyances, etc. I have a few new features turned off in the code with ifdef (this is how you comment stuff out in C++) but I'm thinking about enabling at least some of them
By the way I expect to be slower than usual in answering emails (and maybe on this board) at least for the next week or so, but I will answer.
I copied the code you posted in this thread and uploaded the files to my server. When I click upon the link in the ebook, it calls the sellpassword.asp page, but the P in the {} is not replaced with a number as I thought it would be. The address in the browser is exactly the same as in the ebook's link including the {p}
I am not at all familiar with Php, so please bear with me on this. I would very much like to make this work.
By copying your code exactly, have I in fact made a newbie mistake? I thought the ebook would automatically replace the p with a number so that it would "follow through" the Clickbank purchase and be used by the Thankyou page.
The link containing {p} goes inside your ebook. Enter this in the URL field on Edit System Pages / Password Protection Tab / System Generated page
The ebook will expand this to the number of the password, so the link in the ebook (on the page which says this page is password protected) actually ends up meaning something like this:
if you use "MY Own page" for the password protected page, or you want the buy password link from the ebook to go from some other page in the ebook, put in the {p} like this - [={p}] and enable the preprocessor on the file (Files tab in the compiler)
With Sunil's support, I have developed a script, which combines the best feature of the Activ Ebook Compiler - the 1000-password generation - and that of my own script, the ClickBank download protector, which protects your thank-you page from hackers.
This is written in PHP, and takes the password generation feature of Sunil's compiler a step forward, by showing you how to combine the passwords generated with a script that helps you deliver those passwords right from a link in your ebook, while also protecting your thank-you page.
I put the ERROR in there because it starts counting at 0 instead of 1 to get it on the right password for that number. With the line returns removed in the array the passwordlist.php is 9.8kb in file size opposed to 18.4kb when saved with the Save as Type option.
I learn something new everyday. The bad part is when my head gets full I'll have to forget something old to remember something new, by the time I approach the near genius status I'll have forgotten how to walk or talk.
With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical.