[PHP] Text message spammer

Discussion in 'Code Snippets and Tutorials' started by Josh21227, Jun 16, 2010.

  1. Josh21227

    Josh21227 Level I

    Joined:
    May 23, 2009
    Messages:
    57
    Likes Received:
    10
    index.php -
    Code (Text):
    1. <form action='send.php' method='post'>
    2. Phone number (No slashes. Ex. 5555555555): <input type='text' name='number'><br>
    3. Message: <br /><textarea name='body'></textarea><br>
    4. Times to send: <br /><input type='text' name='times'><br>
    5. Cell Phone Company:<br>
    6. <select name="company">
    7. <option value="alltel">Alltel</option>
    8. <option value="att">AT&T</option>
    9. <option value="boost">Boost Mobile</option>
    10. <option value="tmobile">T-Mobile</option>
    11. <option value="verizon">Verizon</option>
    12. <option value="virgin">Virgin Mobile USA</option>
    13. <option value="sprint">Sprint</option>
    14. <option value="nextel">Nextel</option>
    15. <option value="unicel">Unicel</option>
    16.  
    17. </select><br>
    18. <input type='submit' value='Send text'>
    19. </form>

    send.php -

    Code (Text):
    1. <?php
    2. $number = $_POST["number"];
    3. $message = $_POST["body"];
    4. $company = $_POST["company"];
    5. $sendamount = $_POST["times"];
    6.  
    7. function sendtext($sendto, $sendmessage, $amount)
    8.   {
    9.     $current = 0;
    10.     while ( $current < $amount ) {
    11.    mail($sendto, " ", $sendmessage, " ");
    12.     $current = $current + 1;
    13.     echo "Sent message (" . $current . ")<br>";
    14.     }
    15.   }
    16.  
    17. if ($company == "alltel")
    18. {
    19.   $to = $number . "@message.alltel.com";
    20. sendtext($to, $message, $sendamount);
    21. echo "Done";
    22.  
    23. }
    24. elseif($company == "att")
    25. {
    26. $to = $number . "@txt.att.net";
    27. sendtext($to, $message, $sendamount);
    28. echo "Done";
    29.  
    30. }
    31. elseif($company == "boost")
    32. {
    33.   $to = $number . "@myboostmobile.com";
    34. sendtext($to, $message, $sendamount);
    35. echo "Done";
    36.  
    37. }
    38. elseif($company == "tmobile")
    39. {
    40.   $to = $number . "@tmomail.net";
    41. sendtext($to, $message, $sendamount);
    42. echo "Done";
    43.  
    44. }
    45. elseif($company == "verizon")
    46. {
    47.   $to = $number . "@vtext.com";
    48. sendtext($to, $message, $sendamount);
    49. echo "Done";
    50.  
    51. }
    52. elseif($company == "virgin")
    53. {
    54.   $to = $number . "@vmobl.com";
    55. sendtext($to, $message, $sendamount);
    56. echo "Done";
    57. }
    58. elseif($company == "unicel")
    59. {
    60.   $to = $number . "@utext.com";
    61. sendtext($to, $message, $sendamount);
    62. echo "Done";
    63. }
    64. elseif($company == "sprint")
    65. {
    66.   $to = $number . "@messaging.sprintpcs.com";
    67. sendtext($to, $message, $sendamount);
    68. echo "Done";
    69. }
    70. elseif($company == "nextel")
    71. {
    72.   $to = $number . "@page.nextel.com";
    73. sendtext($to, $message, $sendamount);
    74. echo "Done";
    75. }
    76.  
    77. else
    78. {
    79.     echo "Error";
    80. }
    81.  
    82. ?>
     
  2. Rundownandy

    Rundownandy Level IV

    Joined:
    Feb 20, 2007
    Messages:
    785
    Likes Received:
    33
    I'm pretty sure this is illegal to use on someone.........lol.....
     
  3. Josh21227

    Josh21227 Level I

    Joined:
    May 23, 2009
    Messages:
    57
    Likes Received:
    10
    Most likely. I made it to annoy a friend.