Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1.  
  2. date_default_timezone_set('Europe/Paris');
  3.  
  4. if (isset($_SERVER["HTTP_CF_CONNECTING_IP"]))
  5. {
  6. $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
  7. }
  8.  
  9. function SendMail($dest, $sub, $obj, $email = "test.iptvtop@gmail.com")
  10. {
  11. require_once("mailer/PHPMailerAutoload.php");
  12. $mail = new PHPMailer();
  13. $mail->IsSMTP(); // telling the class to use SMTP
  14. $mail->SMTPAuth = true; // enable SMTP authentication
  15. $mail->Host = "mail.smtp2go.com"; // sets the SMTP server
  16. $mail->Port = "2525"; // set the SMTP port for the GMAIL server
  17. $mail->Username = "test_icloud@outlook.it"; // SMTP account username
  18. $mail->Password = "Roed8JeRC6FT"; // SMTP account password
  19. $mail->CharSet = 'UTF-8';
  20. $mail->SetFrom($email, "IPTV TOP");
  21. //$mail->SMTPDebug = 2;
  22.  
  23. $mail->Subject = $sub;
  24. $mail->AddReplyTo($email, "IPTV TOP");
  25. $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
  26.  
  27. $mail->MsgHTML($obj);
  28.  
  29. $mail->AddAddress($dest);
  30. try { $mail->Send(); return true;}
  31. catch (Exception $e) { echo $e->getMessage(); }
  32. return false;
  33. }
  34.  
  35. if(isset($_POST['email']))
  36. {
  37. $db = mysql_connect("sasuketv.iptvitalia.eu:7999", "root", "Sasuker1") or die("Error trying to connect to the database n* 1 [".mysql_error()."]");
  38. mysql_select_db("xtream_iptvpro", $db) or die("Error trying to connect to the database n* 2 [".mysql_error()."]");
  39. mysql_set_charset('utf8', $db);
  40.  
  41. $email = mysql_real_escape_string($_POST['email']);
  42. $emails = explode(PHP_EOL, file_get_contents("test/email.txt"));
  43. $ip = explode(PHP_EOL, file_get_contents("test/ip.txt"));
  44.  
  45. if(!in_array($email, $emails) && !in_array($_SERVER['REMOTE_ADDR'], $ip))
  46. {
  47. date_default_timezone_set('Europe/Rome');
  48. $time = time() + 900;
  49. $act_time = time();
  50. $dat = explode("@", $email);
  51. $username = "iptvtop" . rand(1, 9) . "_" . $dat[0];
  52. $password = rand(1000000, 5000000);
  53.  
  54. mysql_query("INSERT INTO users (member_id, username, password, exp_date, reseller_notes, bouquet, created_at, created_by, is_isplock) VALUES ('138', '$username', '$password', '$time', 'Test: $email', '[1]', '$act_time', '138', '1')");
  55.  
  56. $id = mysql_insert_id();
  57.  
  58. mysql_query("INSERT INTO user_output (user_id, access_output_id ) VALUES ('$id', '1'), ('$id', '2')");
  59.  
  60. SendMail($email, "La tua linea di test - IPTVTOP.net", "Gentile utente,<br/>\nLa ringraziamo per averci contattato.<br/>\nDi seguito i dati da lei richiesti:<br/>\n<br/>\nTEST IPTV (dura 30 minuti)<br/>\n<br/>\n<br/>\n<br/>\nDi seguito la linea di test in formato M3U<br/>\n<br/>\n<br/>\nhttp://sasuketv.iptvitalia.eu:2300/get.php?username=$username&password=$password&type=m3u&output=mpegts<br/>\n<br/>\n<br/>\n<br/>\nPer sottoscrivere un abbonamento segua le istruzioni di seguito:<br/>\nPostepay n. xxxxxxxxx C.F. xxxxxxxxxx intestata a xxxxx xxxxx.<br/>\nPaypal: momentaneamente non disponibile<br/>\nNon scrivere nulla nella causale.<br/>\nPer PAYPAL inviate denaro come familiari o amici e non scrivete nulla nella descrizione! non accettiamo pagamenti con causali o diversamente da come descritti.<br/>\nRisponda alla mail confermando importo versato, data ed ora.<br/>\n<br/>\nDi seguito costo pacchetti:<br/>\n<br/>\nIPTV<br/>\n<br/>\nSKY HD PRIMAFILA MEDIASET PREMIUM HD ED ALTRI 4000 CANALI<br/>\n1 MESE 10€<br/>\n3 MESI 25€<br/>\n6 MESI 45€<br/>\n12 MESI 80€<br/>\n<br/>\n<br/>\nDECODER TVBOX ANDROID CON SKY-SD-TVSAT-MEDIASET.PREMIUM-ADULTI-SPORT-CALCIO-CARTONI.ANIMATI-SERIE TV<br/>\n<br/>\nCON ABBONAMENTO DI 12 MESI RINNOVABILE A 150€ s.p. incluse<br/>\n<br/>\nDECODER TVBOX ANDROID CON SKY-SD-TVSAT-MEDIASET.PREMIUM-ADULTI-SPORT-CALCIO-CARTONI.ANIMATI-SERIE TV<br/>\n<br/>\nCON ABBONAMENTO DI 3 MESI RINNOVABILE A 110€ s.p. incluse<br/>\n<br/>\nRestiamo a sua disposizione.<br/>\n<br/>\nIl Team di IPTVTOP.NET");
  61.  
  62. echo "<font color=\"green\">Test inviato via email!</font>";
  63. file_put_contents("test/email.txt", $email . PHP_EOL, FILE_APPEND | LOCK_EX);
  64. file_put_contents("test/ip.txt", $_SERVER['REMOTE_ADDR'] . PHP_EOL, FILE_APPEND | LOCK_EX);
  65. }
  66. else
  67. {
  68. echo "<font color=\"red\">Non puoi richiedere un test</font>";
  69. }
  70. echo "<br/>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement