ad - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of ad.php

  1. <?php
  2. $token = "server"; // Replace with your actual token
  3.  
  4. $ch = curl_init();
  5. curl_setopt($ch, CURLOPT_URL, 'https://malak.ba/service.php?token=' . $token);
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  7. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  8. curl_setopt($ch, CURLOPT_POSTFIELDS, "");
  9. curl_setopt($ch, CURLOPT_POST, 1);
  10. curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
  11.  
  12. $result = curl_exec($ch);
  13.  
  14. if (curl_errno($ch)) {
  15.     echo 'Error: ' . curl_error($ch);
  16. } else {
  17.     echo 'Response: ' . $result; // Debugging output to see the response
  18.  
  19.     if (strpos($result, 'Banned or Removed') !== false) {
  20.         echo "Your Free Trial [KEY] Expired Or Suspended. Please Contact Official Cheto Sender ICQ-ID> @GamaLink Telegram= @Ninja111";
  21.         exit(); // Stop script execution
  22.     } else {
  23.         echo "Request Successful. No ban or removal detected.";
  24.         // Proceed with further actions if needed
  25.     }
  26. }
  27.  
  28. curl_close($ch);
  29.  
  30. require 'fin_setting/phpmailer/PHPMailerAutoload.php';
  31. require 'fin_setting/phpmailer/class.phpmailer.php';
  32. require 'fin_setting/phpmailer/class.smtp.php';
  33. require 'fin.config.php';
  34. require 'fin_setting/fin.function.php';
  35.  
  36. //
  37.  
  38.  
  39.         echo "\e[0m\e[1;31m           _________ .__            __            \e[0:33m\r\n";
  40.         echo "★\e[0m\e[1;31m         \_   ___ \|  |__   _____/  |_  ____    \e[0;33m\r\n";
  41.         echo "★\e[0m\e[1;31m         /    \  \/|  |  \_/ __ \   __\/  _ \   \e[0;33m\r\n";
  42.         echo "★\e[0m\e[1;31m         \     \___|   Y  \  ___/|  | (  <_> )  \e[0;31m\r\n";
  43.         echo "★\e[0m\e[1;31m          \______  /___|  /\___  >__|  \____/   \e[0;31m\r\n";
  44.         echo "★\e[0m\e[1;31m                 \/     \/     \/               \e[0;33m\r\n";                                        
  45.         echo "★\e[0m\e[1;33m                  ╔═╗╔═╗╔╗╔╔╦╗╔═╗╦═╗            \e[0;33m\r\n";
  46.         echo "★\e[0m\e[1;33m                  ╚═╗╠╣ ║║║ ║║╠╣ ╠╦╝            \e[0;31m\r\n";
  47.         echo "★\e[0m\e[1;33m                  ╚═╝╚═╝╝╚╝═╩╝╚═╝╩╚═            \e[0;33m\r\n";
  48.         echo "???????????? ????????????????????????        \033[1;32m???????????????????? \033[0m \r\n";
  49.         echo "                         \033[0;33m ★★★ \033[0m     \r\n";
  50.         ????????????:
  51.         echo "\033[0m???????????????????????? ????????????????????\033[0m                 \r\n";
  52.         echo "\033[1;33m????????????:Telegram:Ninja111 \033[0m  \r\n";
  53. //
  54.  
  55.  
  56. function encode($text) {
  57.     $list = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ":", "/");
  58.     $replace = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ":", "/");
  59.     $walah = str_replace($list, $replace, $text);
  60.     return $walah;
  61. }
  62.  
  63. function Kirim($email, $smtp_acc, $fin_setup)
  64. {
  65.     global $ahh, $num;
  66.     $smtp = new SMTP;
  67.     $smtp->do_debug = 0;
  68.     $smtp->SMTPOptions = array(
  69.         'ssl' => array(
  70.             'verify_peer' => false,
  71.             'verify_peer_name' => false,
  72.             'allow_self_signed' => true
  73.         )
  74.     );
  75.     $smtpserver = $smtp_acc['host'];
  76.     $smtpport = $smtp_acc['port'];
  77.     $smtpuser = $smtp_acc['username'];
  78.     $smtppass = $smtp_acc['password'];
  79.     $priority = $fin_setup['priority'];
  80.     $sleeptime = $fin_setup['sleeptime'];
  81.     $replacement = $fin_setup['replacement'];
  82.     $userremoveline = $fin_setup['userremoveline'];
  83.     $fromname = $fin_setup['fromname'];
  84.     $frommail = $fin_setup['frommail'];
  85.     $subject = $fin_setup['subject'];
  86.     $lead = $fin_setup['lead'];
  87.     $msgfile = $fin_setup['msgfile'];
  88.         $sendAttach     = $fin_setup['sendAttach'];
  89.         $attchFlder     = $fin_setup['attchFlder'];
  90.     $attchName      = $fin_setup['attchName'];
  91.     $randurl = $fin_setup['scampage'];
  92.     $redirect = $fin_setup['redirect'];
  93.     $subject_encrypt = $fin_setup['subject_encrypt'];
  94.     $fromname_encrypt = $fin_setup['fromname_encrypt'];
  95.     if (!$smtp->connect($smtpserver, $smtpport))
  96.     {
  97.         //throw new Exception('Connect failed');
  98.         echo "                                    [ \e[0;31mPLEASE CHECK YOUR SMTP SERVER & PORT ! CHECK UR SMTP ON http://smtper.net AND MAKE SURE UR SMTP USE PORT 587 [ CASE 1 ]\e[0m ]";
  99.         die();
  100.     }
  101.     if (!$smtp->hello(gethostname()))
  102.     {
  103.         //throw new Exception('EHLO failed: ' . $smtp->getError()['error']);
  104.         echo "                                    [ \e[0;31mPLEASE CHECK YOUR SMTP SERVER & PORT ! CHECK UR SMTP ON http://smtper.net AND MAKE SURE UR SMTP USE PORT 587 [ CASE 2 ] \e[0m ]";
  105.         die();
  106.     }
  107.     $e = $smtp->getServerExtList();
  108.     if (array_key_exists('AUTH', $e))
  109.     {
  110.         if ($smtp->authenticate($smtpuser, $smtppass))
  111.         {
  112.             if (!is_file($msgfile))
  113.             {
  114.                 echo " [ \e[0;31m LETTER NOT FOUND - PLEASE CHECK YOUR LETTER NAME !\e[0m ]";
  115.                 die();
  116.             }
  117.             if ($fin_setup['sendAttach'] == 1)
  118.             {
  119.                 if (!is_file($fin_setup['attchFlder']))
  120.                 {
  121.                     echo " [ \e[0;31m ATTACHMENT NOT FOUND - PLEASE CHECK YOUR ATTACHMENT NAME !\e[0m ]";
  122.                     die();
  123.                 }
  124.             }
  125.             $randstr023 = RandString1(16);
  126.             $mail = new PHPMailer;
  127.             $mail->Encoding = 'base64'; // 8bit base64 multipart/alternative quoted-printable
  128.             $mail->CharSet = 'UTF-8';
  129.             $mail->headerLine("format", "flowed");
  130.             $mail->addCustomHeader("MIME-Version: 1.0");
  131.             //Start SMTP
  132.             $mail->IsSMTP();
  133.             $mail->SMTPAuth = true;
  134.             $mail->SMTPAutoTLS = 1;
  135.             $mail->Host = $smtpserver;
  136.             $mail->Port = $smtpport;
  137.             $mail->Priority = $priority;
  138.             $mail->Username = $smtpuser;
  139.             $mail->Password = $smtppass;
  140.             $randstr01 = RandString1(8);
  141.             $randstr011 = RandString(5);
  142.             $randstr012 = RandString1(5);
  143.             $nmbr = RandNumber(5);
  144.             $domains = explode('@', $email);
  145.             $domain = $domains[1];
  146.             $domains1 = explode('.', $domain);
  147.             $domain0 = $domains1[0];
  148.             $domain1 = $domains1[0];
  149.             shuffle($subject);
  150.             $subject = array_shift($subject);
  151.             shuffle($fromname);
  152.             $fromname = array_shift($fromname);
  153.             $fromnames = str_replace('<[fin_domain0]>', $domain0, $fromname);
  154.             $frommails = str_replace('<[fin_domain0]>', $domain1, $frommail);
  155.             $fromnames = str_replace('<[fin_randstring]> ', $randstr011, $fromnames);
  156.             $frommails = str_replace('<[fin_randstring]> ', $randstr01, $frommails);
  157.             $subjects = str_replace('<[fin_randstring]>    ', $randstr012,  $subject);
  158.             $subjects = subjecting($subjects, $email, $frommail, $fromname, $randurl, $subject, $redirect);
  159.             $mail->setFrom($frommails, $fromnames);
  160.             $mail->AddAddress($email);
  161.             $mail->Subject = $subjects;
  162.  
  163.             if ($fromname_encrypt == 1)
  164.             {
  165.                 $rand = 0;
  166.                 switch ($rand)
  167.                 {
  168.                     case 0:
  169.                         $fromnames = '=?UTF-8?B?' . base64_encode($fromnames) . '?=';
  170.                         $mail->setFrom($frommails, $fromnames);
  171.                     break;
  172.                 }
  173.             }
  174.             else
  175.             {
  176.                 $mail->setFrom($frommails, $fromnames);
  177.             }
  178.             $mail->AddAddress($email);
  179.             if ($subject_encrypt == 1)
  180.             {
  181.                 $rand = 0;
  182.                 switch ($rand)
  183.                 {
  184.                     case 0:
  185.                         $subjects = '=?UTF-8?B?' . base64_encode($subjects) . '?=';
  186.                         $mail->Subject = $subjects;
  187.                     break;
  188.                 }
  189.             }
  190.             else
  191.             {
  192.                 $mail->Subject = $subjects;
  193.             }
  194.                         if ($fin_setup['sendAttach'] == 1) {
  195.                                 $attchFlder = str_replace('<[fin_email]>',$email,file_get_contents($fin_setup['attchFlder']));
  196.                                 $attchName = str_replace('<[fin_domain0]>', $domain0, $fin_setup['attchName']);
  197.                                 $mail->addStringAttachment($attchFlder, $attchName, 'base64', 'application/octetstream');
  198.             }
  199.                        
  200.             if ($replacement == 1)
  201.             {
  202.                 $msg = lettering($msgfile, $email, $frommail, $fromname, $randurl, $subject, $redirect);
  203.             }
  204.             else
  205.             {
  206.                 $msg = file_get_contents($msgfile);
  207.             }
  208.             $mail->msgHTML($msg);
  209.             if (!$mail->send())
  210.             {
  211.                 $halo = $mail->ErrorInfo;
  212.                 if (preg_match('/quota/', $halo))
  213.                 {
  214.                     $err = 1;
  215.                 }
  216.                 if ($err == 1)
  217.                 {
  218.                     echo "[\e[0;32m" . date('d/m/Y h:i:s A') . "[0m] ";
  219.                     echo "[\e[1;35m";
  220.                     echo $num + 1 . "\e[0m] ";
  221.                     echo "\e[0m[\e[1;34m$email\e[0m] ";
  222.                     echo "\e[0m\e==> [ \e[0m(\e[0;33m$smtpuser\e[0m)] > [\e[0;31m- SMTP SEND QUOTA HAS LIMIT - NOT REMOVED\e[0m]";
  223.                     echo "\r\n";
  224.                 }
  225.                 else
  226.                 {
  227.                     if ($fin_setup['userremoveline'] == 1)
  228.                     {
  229.                         echo "[\e[0;32m" . date('d/m/Y h:i:s A') . "[0m] ";
  230.                         echo "[\e[1;35m";
  231.                         echo $num + 1 . "\e[0m] ";
  232.                         echo "\e[0m[\e[1;34m$email\e[0m] ";
  233.                         echo "\e[0m\e==> [\e[0m(\e[0;33m$smtpuser\e[0m)] > [\e[0;31mEMAIL NOT VALID - REMOVED\e[0m]";
  234.                         echo "\r\n";
  235.                         Savedata($fin_setup['lead'], trim(str_replace($email, "", file_get_contents($fin_setup['lead']))));
  236.                         $file = fopen("fin_invalid.txt", "a+");
  237.                         fwrite($file, "$email");
  238.                         fclose($file);
  239.                     }
  240.                     else
  241.                     {
  242.                         echo "[\e[0;32m" . date('d/m/Y h:i:s A') . "[0m] ";
  243.                         echo "[\e[1;35m";
  244.                         echo $num + 1 . "\e[0m] ";
  245.                         echo "\e[0m[\e[1;34m$email\e[0m] ";
  246.                         echo "\e[0m\e==> [ \e[0m(\e[0;33m$smtpuser\e[0m)] > [\e[0;31m- EMAIL NOT VALID - NOT REMOVED\e[0m]";
  247.                         echo "\r\n";
  248.                     }
  249.                     //exit();
  250.                     
  251.                 }
  252.             }
  253.             else
  254.             {
  255.                 echo "                              [\e[0;32m" . date('d/m/Y h:i:s A') . "[0m] ";
  256.                 echo "[\e[1;35m";
  257.                 echo $num + 1 . "\e[0m] ";
  258.                 echo "\e[0m[\e[1;34m$email\e[0m] ";
  259.                 echo "\e[0m==> [ \e[0m(\e[0;33m$smtpuser\e[0m)] > [\e[0;32m- EMAIL VALID - SPAMMED\e[0m]";
  260.                 echo "\r\n";
  261.                 $file = fopen("fin_sp4mmed.txt", "a");
  262.                 fwrite($file, "" . $email . " ");
  263.                 fclose($file);
  264.             }
  265.             $mail->clearAddresses();
  266.         }
  267.         else
  268.         {
  269.             echo "                       [\e[0;32m" . date('d/m/Y h:i:s A') . "[0m] ";
  270.             echo "[\e[1;35m";
  271.             echo $num + 1 . "\e[0m] ";;
  272.             echo "\e[0m[\e[1;34m$email\e[0m] ";
  273.             echo "\e[0m\e==> [ \e[0m(\e[0;33m$smtpuser\e[0m)] > [\e[0;31m- SOMETHING WRONG ON SMTP - NOT REMOVED\e[0m]";
  274.             echo "\r\n";
  275.             $file = fopen("fin_failed.txt", "a");
  276.             fwrite($file, "" . $email . " ");
  277.             fclose($file);
  278.         }
  279.     }
  280.     $smtp->quit(true);
  281. }
  282. $dipake = 0;
  283. if (!is_file($fin_setup['lead']))
  284. {
  285.     echo "                                                                        [ \e[0;31m MAILIST NOT FOUND - PLEASE CHECK YOUR MAILIST NAME !\e[0m ]";
  286.     die();
  287. }
  288. $file = file_get_contents($fin_setup['lead']);
  289. if ($file)
  290. {
  291.     $ext = explode("\n", $file);
  292.     echo "                                                       ============================= [ CAMPAIGN SCRIPT RE4DY ] =============================";
  293.     echo "\r\n";
  294.     echo "\r\n";
  295.     $smtp_key = 0;
  296.     $rat = $fin_setup['ratio'];
  297.     $crot = 0;
  298.     $crotmax = count($ext) - 1;
  299.     foreach ($ext as $num => $email)
  300.     {
  301.         if ($smtp_key == count($smtp_acc))
  302.         {
  303.             $smtp_key = 0;
  304.         }
  305.  
  306.         $ahh = $ext[$crot];
  307.         $gx_setup['fromname'] = $ahh;
  308.         $crot++;
  309.         if ($crot >= $crotmax)
  310.         {
  311.             $crot = 0;
  312.         }
  313.         //kirim
  314.         Kirim($email, $smtp_acc[$smtp_key], $fin_setup);
  315.         $dipake++;
  316.         $smtp_key++;
  317.         $rat--;
  318.         if ($rat == 0)
  319.         {
  320.             sleep($fin_setup['sleeptime']);
  321.             $rat = $fin_setup['ratio'];
  322.  
  323.             echo "\r\n";
  324.             echo "\e[31m                                                                      ======= CAMPAIGN $rat EMAIL(S) WITH DELAY FOR ";
  325.             echo $fin_setup['sleeptime'];
  326.             echo " SECONDS  =======\e[0m ";
  327.             echo "\r\n";
  328.             echo "\r\n";
  329.         }
  330.  
  331.         if ($fin_setup['userremoveline'] == 1)
  332.         {
  333.             unset($ext[$num]);
  334.             Savedata($fin_setup['lead'], implode("", $ext));
  335.         }
  336.     }
  337.     echo "\r\n";
  338.     echo "                                                       ============================= [ CAMPAIGN SCRIPT ENDED ] =============================";
  339.     echo "\r\n";
  340. }
  341. ?>
File Description
  • ad
  • PHP Code
  • 13 May-2024
  • 13.36 Kb
You can Share it: