Advertisement
Guest User

Untitled

a guest
May 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. <?php
  2. $sms_to='1797248121';
  3. $txt='test';
  4.  
  5. function do_win_sms($sms_to,$txt){
  6. // $sms_to = '01797248121';
  7. // $txt='test';
  8. /*http://ezpaybd.com/winsms/api/sendSMS?userId=osaps&password=shakil&text=lorem%20ipsum%20dolor%20set%20&mobileNumbers=01838818014*/
  9.  
  10. /*$url = 'http://ezpaybd.com/winsms/api/sendSMS';
  11. $params = array('userId' => 'osaps',
  12. 'password' => 'shakil',
  13. 'text' => $txt,
  14. 'mobileNumbers' => $sms_to
  15. );*/
  16.  
  17. // http://202.74.240.169/sending_sms_win/Default.aspx?login_name=bou&mobileno=01838818014&msg=bou
  18.  
  19.  
  20. $url = 'http://202.74.240.169/sending_sms_win/Default.aspx';
  21. $params = array('login_name' => 'bou',
  22. 'mobileno' => $sms_to,
  23. 'msg' => $txt
  24. );
  25. /* Update URL to container Query String of Paramaters */
  26. $url .= '?' . http_build_query($params);
  27. /* cURL Resource */
  28. $ch = curl_init();
  29. /* Set URL */
  30. curl_setopt($ch, CURLOPT_URL, $url);
  31. /* Tell cURL to return the output */
  32. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  33. /* Tell cURL NOT to return the headers */
  34. curl_setopt($ch, CURLOPT_HEADER, false);
  35. /* Execute cURL, Return Data */
  36. $data = curl_exec($ch);
  37. /* Check HTTP Code */
  38. $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  39. /* Close cURL Resource */
  40. curl_close($ch);
  41. /* 200 Response! */
  42. print_r($data);
  43. }
  44.  
  45.  
  46. do_win_sms();
  47. //
  48. //$servername = "localhost";
  49. //$username = "root";
  50. //$password = "mysql";
  51. //$database = "osap";
  52. //
  53. //// Create connection
  54. //$conn = new mysqli($servername, $username, $password, $database);
  55. //// Check connection
  56. //if ($conn->connect_error) {
  57. // die("Connection failed: " . $conn->connect_error);
  58. //}
  59. //
  60. //
  61. ////$sql = "INSERT INTO MyGuests (firstname, lastname, email)
  62. ////VALUES ('John', 'Doe', 'john@example.com')";
  63. //$sql = "SELECT * FROM program_student_information WHERE program_circular_id = 35";
  64. //$result = $conn->query($sql);
  65. //print_r($result->num_rows);
  66. //if ($result->num_rows > 0) {
  67. // // output data of each row
  68. // while($row = $result->fetch_assoc()) {
  69. //
  70. // $user_id = $row["user_student_id"];
  71. // $username = $row["user_student_id"];
  72. // $pass = rand(111111,999999);
  73. // $md5= md5($pass);
  74. //
  75. // $sqlIns = "INSERT INTO message (user_id, username, password) VALUES ('$user_id', '$username','$pass' )";
  76. // $sqlUpdate = "UPDATE `osap`.`program_student_information` SET `password` = '$md5' WHERE `program_student_information`.`user_student_id` = $user_id";
  77. // $conn->query($sqlIns);
  78. // $conn->query($sqlUpdate);
  79. // echo 'success';
  80. // }
  81. //} else {
  82. // echo "0 results";
  83. //}
  84. //
  85. //$conn->close();
  86.  
  87.  
  88. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement