Jump to content

[Help] Need help in adding sms verification [Help]


JayKapoor

Recommended Posts

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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.