xenergy 3 Posted November 24, 2013 Report Share Posted November 24, 2013 Wow, I've been looking for this to bring my bot to the next level.Thanks for the great tutorial Kev. Quote Link to post Share on other sites
jamesfar 15 Posted November 26, 2013 Report Share Posted November 26, 2013 I got this MySQL syntax error even i have follow the exact MySQL syntax on Kev picture Here is the error i got : http://screencast.com/t/U47rkkeV7w Any one please help Quote Link to post Share on other sites
Kev 69 Posted November 26, 2013 Author Report Share Posted November 26, 2013 I got this MySQL syntax error even i have follow the exact MySQL syntax on Kev picture Here is the error i got : http://screencast.com/t/U47rkkeV7w Any one please helpIs your table called "order"? Just curious cause it's an unusual name and so close to the sql syntax "ORDER BY" 1 Quote Link to post Share on other sites
Kev 69 Posted November 26, 2013 Author Report Share Posted November 26, 2013 I got this MySQL syntax error even i have follow the exact MySQL syntax on Kev picture Here is the error i got : http://screencast.com/t/U47rkkeV7w Any one please help SELECT * FROM `TABLENAME` ORDER BY `COLUMNNAME` LIMIT 1That is probably what you were looking for, if using ORDER BY But if not, SELECT * FROM `TABLENAME` LIMIT 1Should do it just fine. 1 Quote Link to post Share on other sites
jamesfar 15 Posted November 26, 2013 Report Share Posted November 26, 2013 SELECT * FROM `TABLENAME` ORDER BY `COLUMNNAME` LIMIT 1That is probably what you were looking for, if using ORDER BY But if not, SELECT * FROM `TABLENAME` LIMIT 1Should do it just fine. my table name is the problem. it works ok after i changed the table name i also watch your "helping blind people" project all awesome Kev Wish you all the best with all of your awesome project :-) Quote Link to post Share on other sites
Tony H. 16 Posted November 27, 2013 Report Share Posted November 27, 2013 Very Good Kev! One thing that could improve your stability of the bots is to only trigger them when a new entry is made.You could make a request from your server that is storing the form data in the db and trigger the bot on your remote host to start as well. In this case you do not have to loop so much. Otherwise good thinking and thanks for sharing your experiences. Tony Quote Link to post Share on other sites
Kev 69 Posted November 27, 2013 Author Report Share Posted November 27, 2013 Very Good Kev! One thing that could improve your stability of the bots is to only trigger them when a new entry is made.You could make a request from your server that is storing the form data in the db and trigger the bot on your remote host to start as well. In this case you do not have to loop so much. Otherwise good thinking and thanks for sharing your experiences. TonyTony that would be ideal. Do you have a link to a resource that would show how to set up a trigger? Quote Link to post Share on other sites
illmill 87 Posted December 11, 2013 Report Share Posted December 11, 2013 I'm about to get started on this over the weekend. Just curious, how long does it usually take you to set this up (not including the time to program the bot)? Just the time to set up the website, form, mysql, everything to make it work? Quote Link to post Share on other sites
illmill 87 Posted December 19, 2013 Report Share Posted December 19, 2013 A couple of questions.... Is there any way you can set it up so the actions performed by the bot are coming from their IP or something near them? I just realized that doing this will mean that everything comes from my home IP and for the site I'm automating that's going to be a problem. I could use proxies, but that won't really help me. How do you offer different packages for billing people and upselling them your different services? Do you use wishlist member or something similar? Quote Link to post Share on other sites
Kev 69 Posted December 26, 2013 Author Report Share Posted December 26, 2013 I'm about to get started on this over the weekend. Just curious, how long does it usually take you to set this up (not including the time to program the bot)? Just the time to set up the website, form, mysql, everything to make it work?It takes me about 5 mins simply as I created a bot to do the whole database setup for me. However, manually it would take between 20-30 mins Quote Link to post Share on other sites
Kev 69 Posted December 26, 2013 Author Report Share Posted December 26, 2013 A couple of questions.... Is there any way you can set it up so the actions performed by the bot are coming from their IP or something near them? I just realized that doing this will mean that everything comes from my home IP and for the site I'm automating that's going to be a problem. I could use proxies, but that won't really help me. How do you offer different packages for billing people and upselling them your different services? Do you use wishlist member or something similar?I run a lot of my software on a vps. You can purchase a vps for around 150$ per month, perhaps even cheaper. My one costs me $225 and I'm paying for additional ram. Quote Link to post Share on other sites
illmill 87 Posted December 28, 2013 Report Share Posted December 28, 2013 Just a heads up to everyone: they will close your account and ban your ip if you are asking for email/username and password. They consider this phishing even when you're not. Here's the message I got from their support: The problem is that you created a form to request password along with username/email. Creating these type of forms violates our terms of use as it is considered a phishing activity Sorry, but we cannot reactivate your account Any other ideas on other form providers you could use for this? I'm guessing any of them as long as they let you send POST data and be sent to a custom thankyou url. Quote Link to post Share on other sites
Kev 69 Posted December 28, 2013 Author Report Share Posted December 28, 2013 If jotform won't allow passwords then you could always custom make your own php forms to submit the data to a database? I'm sure you could find a tutorial easily enough, or odesk the task. Thanks for the heads up though! Quote Link to post Share on other sites
illmill 87 Posted December 30, 2013 Report Share Posted December 30, 2013 EDIT: Nevermind, someone on the skype group helped me out with the issue i'm having. I'm creating a form from scratch and using wordpress and wishlist membership plugin to set this all up. I will post instructions once I have it working so you can create these forms with more customizable options (ie. use bootstrap layouts or whatever) and it will be totally FREE! 2 Quote Link to post Share on other sites
jamesfar 15 Posted December 30, 2013 Report Share Posted December 30, 2013 EDIT: Nevermind, someone on the skype group helped me out with the issue i'm having. I'm creating a form from scratch and using wordpress and wishlist membership plugin to set this all up. I will post instructions once I have it working so you can create these forms with more customizable options (ie. use bootstrap layouts or whatever) and it will be totally FREE! Will be waiting for your tutorial Illmill Quote Link to post Share on other sites
illmill 87 Posted January 2, 2014 Report Share Posted January 2, 2014 Okay, I got it set up. Now I just have to modify my bot to run off the database the way that kev outlined, but I figured I could take a break to explain how you can set up your site to do this without paying for any form plugin or service (although jotforms looks really good, they wouldn't let me have fields for 'email' and 'password' so I had to figure something else out). I like to use Wishlist Member plugin for Wordpress to set up all my membership sites. I bought their license that lets me install it on as many domains as I want and I think it was something like $200 one time fee. It's by far the best investment I have made (next to ubot) and has paid for itself many times over. I recommend it, but if you have another way to charge people for this service and protect the content so they have to pay to get access, then by all means save your money. This will work on a non-wp website and it will actually be a bit easier to set up, but I will explain how to do everything. Step 1: Do everything Kev generously outlined for setting up the php script where people will be sent after they click submit. You can remove the field for IP unless you want to set up a script that captures their IP and sends that in a hidden field. Leave the field for submission_id. You will need this one otherwise the whole script and database stuff won't work. Here is my exact script I used minus my database login credentials: <?php function ExtendedAddslash(&$params) { foreach ($params as &$var) { // check if $var is an array. If yes, it will start another ExtendedAddslash() function to loop to each key inside. is_array($var) ? ExtendedAddslash($var) : $var=addslashes($var); unset($var); } } // Initialize ExtendedAddslash() function for every $_POST variable ExtendedAddslash($_POST); $submission_id = $_POST['submission_id']; $email = $_POST['email']; $password = $_POST['password']; $db_host = 'localhost'; $db_username = '-------'; $db_password = '-------'; $db_name = '-------'; mysql_connect( $db_host, $db_username, $db_password) or die(mysql_error()); mysql_select_db($db_name); // search submission ID $query = "SELECT * FROM `myTableName` WHERE `submission_id` = '$submission_id'"; $sqlsearch = mysql_query($query); $resultcount = mysql_numrows($sqlsearch); if ($resultcount > 0) { mysql_query("UPDATE `myTableName` SET `submission_id` = '$submission_id', `email` = '$email', `password` = '$password', WHERE `submission_id` = '$submission_id'") or die(mysql_error()); } else { mysql_query("INSERT INTO `myTableName` (submission_id, email, password) VALUES ('$submission_id', '$email', '$password') ") or die(mysql_error()); } header( 'Location: http://google.com' ) ; ?> Step 2: Create the form. This took a while for me to figure out because I don't know php, but after I got it I realized how easy it actually is. What's cool is that you can set up the forms with bootstrap, css3, html5, etc. so they look really nice on all different devices. I have an android phone and it has a smaller screen than most phones so I like this because I can make it look good on my phone as well as all other smartphones. Keep in mind that I'm using wordpress and php doesn't work inside wordpress so I had to get a plugin called Shortcode Exec PHP. It lets you execute PHP inside your posts or pages or whatever. Here is the PHP I set up inside that plugin. If you aren't using wp then you can skip this part and just use the php script straight inside the code for your form. I set up a new shortcode [random_number] with the code: echo(mt_rand(1,999999999)); After that I use that shortcode in the form. Here's the entire code for that form: <form action="../../submissions/mySubmissionScript.php" method="post" name="myForm"> <input type="hidden" name="submission_id" value="[random_number]"><br> <h3>Email <input id="email" type="text" name="email" /></h3> <h3>Password <input id="password" type="password" name="password" /></h3> <input type="submit" value="Submit" /> </form> Step 3: Follow the rest of Kev's instructions on setting up the loop so your bot checks for new submissions and runs 24/7. That's the part I'm on now. Quote Link to post Share on other sites
webpro 31 Posted January 5, 2014 Report Share Posted January 5, 2014 ARE YOU KIDDING ME !!!!!!!!!!!!!????? Kev, this is the best late Xmas gift i received ! Guys, you can LIKE da post you know2cents Quote Link to post Share on other sites
HelloInsomnia 1103 Posted January 5, 2014 Report Share Posted January 5, 2014 ARE YOU KIDDING ME !!!!!!!!!!!!!????? Kev, this is the best late Xmas gift i received ! Guys, you can LIKE da post you know2cents You can't see who liked the posts anymore but I am sure many have already Quote Link to post Share on other sites
Kev 69 Posted January 14, 2014 Author Report Share Posted January 14, 2014 Folks Just a quick update for you. Later this week, or possibly later today, I'll share a video with you of me automating the whole jotform > php file creation > database set up and table creation + columns. I use it all the time when I want to make a new automated bot. You'll love it and it will save you all the steps above. However, you need to know how to do all of the steps above in order to understand the whole process. Sometimes you might need to make minor tweaks to the php file and understanding the flow like you've learnt will enable you to move through this so much quicker. Also, just to be transparent here. I actually created another way that will only run the software WHEN it needs to, eliminating the need to run the bot 24/7. It does not need to implement a database locally nor uses a database. It uses everything you've already got in this thread. More later, Kev PS click on my link in my sig to join my fb group 2 Quote Link to post Share on other sites
jamesfar 15 Posted January 14, 2014 Report Share Posted January 14, 2014 Folks Just a quick update for you. Later this week, or possibly later today, I'll share a video with you of me automating the whole jotform > php file creation > database set up and table creation + columns. I use it all the time when I want to make a new automated bot. You'll love it and it will save you all the steps above. However, you need to know how to do all of the steps above in order to understand the whole process. Sometimes you might need to make minor tweaks to the php file and understanding the flow like you've learnt will enable you to move through this so much quicker. Also, just to be transparent here. I actually created another way that will only run the software WHEN it needs to, eliminating the need to run the bot 24/7. It does not need to implement a database locally nor uses a database. It uses everything you've already got in this thread. More later, Kev PS click on my link in my sig to join my fb group Can wait to watch it Kev Quote Link to post Share on other sites
Kev 69 Posted January 15, 2014 Author Report Share Posted January 15, 2014 Ok folks, below is a youtube video of the entire walk through for developing the php file, creating the database, DB table and naming all the columns. It takes literally just one minute to do automically as opposed to 15-20 minutes the manual way. http://www.youtube.com/watch?v=lTEgReHRoYU&feature=youtu.be 2 Quote Link to post Share on other sites
positivity13 4 Posted January 23, 2014 Report Share Posted January 23, 2014 Hi Kev, Awesome tutorial!!! The one thing im stuck on is putting the actual bot and batch file on the server. I have made sure it is a windows one but lost how to actually put it on. Any help guys? Quote Link to post Share on other sites
Kev 69 Posted January 24, 2014 Author Report Share Posted January 24, 2014 Hi Kev, Awesome tutorial!!! The one thing im stuck on is putting the actual bot and batch file on the server. I have made sure it is a windows one but lost how to actually put it on. Any help guys? Hi Stuck how exactly? Where to put the exe? Where to put the batch file? I keep all the exe and batch files together for each project. e.g. c:\specificbot\bot.exe for the exe and for the batch c:\specificbot\bot.bat Quote Link to post Share on other sites
WarrenIndLLC 0 Posted January 24, 2014 Report Share Posted January 24, 2014 Hey Kev, Love the work! I was wondering if you had a tutorial for running the software only WHEN it needs to so the bot doesn't have to run 24/7? I can't wait to see it put to work as I believe it's my last step to really get things working! Thanks! Quote Link to post Share on other sites
Kev 69 Posted January 25, 2014 Author Report Share Posted January 25, 2014 Hey Kev, Love the work! I was wondering if you had a tutorial for running the software only WHEN it needs to so the bot doesn't have to run 24/7? I can't wait to see it put to work as I believe it's my last step to really get things working! Thanks! Started a thread on that very question here http://www.ubotstudio.com/forum/index.php?/topic/15806-run-software-on-iphone-part-2/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.