Advertisement
Guest User

Untitled

a guest
Feb 5th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9.  
  10. <?php
  11. require_once '../../twilio-php-master/Twilio/autoload.php';
  12.  
  13. use Twilio\Rest\Client;
  14.  
  15. $sid = "AC579f950b5f423413698a89bc463713ee";
  16. $token = "ef3a546cc8670bde2696db5fa1d32ca9";
  17. $twilio = new Client($sid, $token);
  18.  
  19.  
  20. print($message->sid);
  21. $servername = "localhost";
  22. $username = "workshe3_test";
  23. $password = "cats8000";
  24. $dbname = "workshe3_test";
  25.  
  26. $conn =new mysqli($servername, $username, $password, $dbname);
  27.  
  28. $sql = "SELECT * FROM numbers";
  29.  
  30. $result = $conn->query($sql);
  31.  
  32.  
  33. while($row = $result->fetch_assoc())
  34.  
  35. $number = $row["Number"];
  36.  
  37. $message = $twilio->messages
  38. ->create($number, // to
  39. array(
  40. "from" => "+12342629241",
  41. "body" => "if you read this you owe ty 5$"
  42. )
  43. );
  44.  
  45.  
  46.  
  47. ?>
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement