JayKapoor Posted September 30, 2013 Share Posted September 30, 2013 Hi All, I hope you all are doing well. I am very new to this forum. My name is Jay. I am developing a website and this would be my first attempt at a dynamic website. I cam across an open source piece of code <!DOCTYPE html> <!-- TechDoc Team --> <html> <head> <link rel="stylesheet" type="text/css" href="css/main.css" /> <title>SMS</title> </head> <body class="body"> <div align="center" class="sms"> <h1 align="center">Send Free SMS</h1> <form action="" method="POST"> <input type="text" name="recipient" maxlength="10" required placeholder="Recipient"><br /> <textarea class="textarea" name="message" maxlength="140" required placeholder="Message"></textarea><br /> <input type="submit" value="SEND"> <input type="RESET" value="RESET"> </form> </div> <div id="footer" align="center">© 2013 <a href="http://www.techdoc.in/"> TechDoc</a> | All Rights Reserved | <a href="http://www.hiddenx.tk">ERROR? Let me know</a> | <a href="https://github.com/nitishraj/fullonsms-api">Source</a> </div> </body> </html> <?php if (isset($_POST['recipient'], $_POST['message'])) { $recipient=$_POST['recipient']; $message=urlencode($_POST['message']); $cookie_file_path = "/cookie.txt"; $username="9999999999"; //your Phone Number Here $password="Your_Password_Here"; //your Password $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://sms.fullonsms.com/login.php"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_POSTFIELDS, "MobileNoLogin=$username&LoginPassword=$password&x=16&y=14"); $html=curl_exec($ch); curl_setopt($ch, CURLOPT_URL,"http://sms.fullonsms.com/home.php"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_POSTFIELDS, "ActionScript=%2Fhome.php&CancelScript=%2Fhome.php&HtmlTemplate=%2Fvar%2Fwww%2Fhtml%2Ffullonsms%2FStaticSpamWarning.html&MessageLength=140&MobileNos=$recipient&Message=$message&Gender=0&FriendName=Your+Friend+Name&ETemplatesId=&TabValue=contacts"); $html = curl_exec($ch); echo $html; header("location: index.php"); } else{ exit; } ?> I am wondering how can i use this to add an sms verification system. So that when every user signs up they have to enter their number here and have to verify their number in order to proceed furthur. Can someone guide me through the process of implementing this? Any help would be highly appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 30, 2013 Share Posted September 30, 2013 you need a SMS gateway like Twilio https://www.twilio.com/blog/2012/04/build-a-simple-phone-verification-with-twilio-php-mysql-and-jquery.html Quote Link to comment Share on other sites More sharing options...
JayKapoor Posted October 1, 2013 Author Share Posted October 1, 2013 you need a SMS gateway like Twilio https://www.twilio.com/blog/2012/04/build-a-simple-phone-verification-with-twilio-php-mysql-and-jquery.html FullOnSMS is a free sms sending service, and twilio doesn't work in india. thanks for your suggestion though Quote Link to comment Share on other sites More sharing options...
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.