Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $sms_to='1797248121';
- $txt='test';
- function do_win_sms($sms_to,$txt){
- // $sms_to = '01797248121';
- // $txt='test';
- /*http://ezpaybd.com/winsms/api/sendSMS?userId=osaps&password=shakil&text=lorem%20ipsum%20dolor%20set%20&mobileNumbers=01838818014*/
- /*$url = 'http://ezpaybd.com/winsms/api/sendSMS';
- $params = array('userId' => 'osaps',
- 'password' => 'shakil',
- 'text' => $txt,
- 'mobileNumbers' => $sms_to
- );*/
- // http://202.74.240.169/sending_sms_win/Default.aspx?login_name=bou&mobileno=01838818014&msg=bou
- $url = 'http://202.74.240.169/sending_sms_win/Default.aspx';
- $params = array('login_name' => 'bou',
- 'mobileno' => $sms_to,
- 'msg' => $txt
- );
- /* Update URL to container Query String of Paramaters */
- $url .= '?' . http_build_query($params);
- /* cURL Resource */
- $ch = curl_init();
- /* Set URL */
- curl_setopt($ch, CURLOPT_URL, $url);
- /* Tell cURL to return the output */
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- /* Tell cURL NOT to return the headers */
- curl_setopt($ch, CURLOPT_HEADER, false);
- /* Execute cURL, Return Data */
- $data = curl_exec($ch);
- /* Check HTTP Code */
- $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- /* Close cURL Resource */
- curl_close($ch);
- /* 200 Response! */
- print_r($data);
- }
- do_win_sms();
- //
- //$servername = "localhost";
- //$username = "root";
- //$password = "mysql";
- //$database = "osap";
- //
- //// Create connection
- //$conn = new mysqli($servername, $username, $password, $database);
- //// Check connection
- //if ($conn->connect_error) {
- // die("Connection failed: " . $conn->connect_error);
- //}
- //
- //
- ////$sql = "INSERT INTO MyGuests (firstname, lastname, email)
- ////VALUES ('John', 'Doe', 'john@example.com')";
- //$sql = "SELECT * FROM program_student_information WHERE program_circular_id = 35";
- //$result = $conn->query($sql);
- //print_r($result->num_rows);
- //if ($result->num_rows > 0) {
- // // output data of each row
- // while($row = $result->fetch_assoc()) {
- //
- // $user_id = $row["user_student_id"];
- // $username = $row["user_student_id"];
- // $pass = rand(111111,999999);
- // $md5= md5($pass);
- //
- // $sqlIns = "INSERT INTO message (user_id, username, password) VALUES ('$user_id', '$username','$pass' )";
- // $sqlUpdate = "UPDATE `osap`.`program_student_information` SET `password` = '$md5' WHERE `program_student_information`.`user_student_id` = $user_id";
- // $conn->query($sqlIns);
- // $conn->query($sqlUpdate);
- // echo 'success';
- // }
- //} else {
- // echo "0 results";
- //}
- //
- //$conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement