Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 592821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:46:48+00:00 2026-05-13T15:46:48+00:00

I’m trying to find the security code in this php for a mailer. Please

  • 0

I’m trying to find the security code in this php for a mailer.
Please could you tell me which parts of the code I need to delete to remove this.

Thanks for your help

    <?php
$adminemail = 'info@blue.co.uk'; // type your actual email address in place of you@yourdomain.com

$usesecimage = ''; // the path to a WSN Links, Gallery, KB or Forum install if you wish to borrow its security image prompt

$autoresponse = ''; // type the URL of a text file which should be used as the autoresponder body text

$controlvars = ' thankspage submitteremail ccsubmitter messagetosubmitter ';
$messagetoadmin = "A user has filled out a form with this content:


";

 if (!isset($_POST['messagetosubmitter'])) $messagetosubmitter = "You have submitted a form with the content listed below. Your submission will be reviewed, please be patient in awaiting a response.


";
 else $messagetosubmitter = $_POST['messagetosubmitter'];

while(list($key, $value) = each($_POST))
{
 if (!stristr($controlvars, ' '. $key .' '))
 {
  $messagetoadmin .= $key .': '. $value .'

';
  $messagetosubmitter .= $key .': '. $value .'

';
 }
} 
$submitter = $_POST['submitteremail'];
if ($submitter == '') $submitter = 'info@innco.uk';
if (strstr($submitter, "\n") || strlen($submitter) > 50) die("Begone, foul spammer.");

if ($usesecimage)
{
 $curr_path = getcwd(); 
 chdir($usesecimage);        // Go to the WSN directory 
 require 'start.php'; 
 if (isset($_REQUEST['seed'])) $seed = $_REQUEST['seed']; else $seed = false;
 $correct = securityimagevalue($seed);
 if (strtolower($_POST['securityimage']) != $correct) die("You did not type the value from the image correctly. Press the back button.");
 chdir($curr_path);      // Return to original directory 
}

   session_start();
   if(empty($_POST['TermsOfBusiness']))
   {
    error_reporting(0);
    echo "You must agree to our Terms of Business. Please <a href='javascript: history.go(-1)'>click here</a> to return to the form";
   }
   elseif(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {

      mail("$adminemail, kat@cat.com", 'Form Submitted: '. stripslashes($_POST['subject']), stripslashes($messagetoadmin), 'From: '. $submitter);
      unset($_SESSION['security_code']);

   } else {
      error_reporting(0);
      echo "The security code you entered was incorrect, please click the back button on your browser to try again.";
   }

if ($_POST['ccsubmitter'] == 'yes')
{
 mail($submitteremail, 'Form Submitted: '. stripslashes($_POST['subject']), stripslashes($messagetosubmitter), 'From: '. $adminemail);
}
if ($autoresponse != '')
{
 $body = geturl($autoresponse);
 mail($submitteremail, 'Re: '. stripslashes($_POST['subject']), stripslashes($body), 'From: '. $adminemail);
}
header('Location: '. $_POST['thankspage']);
// just in case redirect doesn't work
die('<meta http-eqiv="refresh" content="0;url='. $_POST['thankspage'] .'">');

if (!function_exists('geturl'))
{
function geturl($url)
{
 if (extension_loaded('curl')) 
 {
   $user_agent = 'Mozilla/4.0 (compatible; MSIE 6.02; PHP)';
   $ch = curl_init(); 
   curl_setopt ($ch, CURLOPT_URL, $url); 
   curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); 
   curl_setopt ($ch, CURLOPT_HEADER, false); 
   curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); 
   curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15);  // timeout after 5 seconds
   curl_setopt ($ch, CURLOPT_TIMEOUT, 15);  // timeout after 5 seconds   
   curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true); 
   $result = curl_exec ($ch); 
   curl_close ($ch); 
// curl_error($ch); // for debugging
   return $result;  
 }

 if (version_compare("4.3.0", phpversion(), "<"))
 { 
  $filecontents = @file_get_contents($url);
 }
 else
 {
  $fd = @fopen($url, 'rb');
  $filecontents = "";
  do 
  {
   $data = @fread($fd, 8192);
   if (strlen($data) == 0) 
   {
    break;
   }
   $filecontents .= $data;
  } while(true); 
  @fclose ($fd);
 }
 return $filecontents;
}
}

?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:46:49+00:00Added an answer on May 13, 2026 at 3:46 pm

    remove this 🙂

    EDIT: the elseif.. wasn’t showing as code, corrected.

    elseif(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
    
          mail("$adminemail, kat@cat.com", 'Form Submitted: '. stripslashes($_POST['subject']), stripslashes($messagetoadmin), 'From: '. $submitter);
          unset($_SESSION['security_code']);
    
       } else {
          error_reporting(0);
          echo "The security code you entered was incorrect, please click the back button on your browser to try again.";
       }
    

    and this (by Cameron Conner)

    if ($usesecimage)
    {
     $curr_path = getcwd(); 
     chdir($usesecimage);        // Go to the WSN directory 
     require 'start.php'; 
     if (isset($_REQUEST['seed'])) $seed = $_REQUEST['seed']; else $seed = false;
     $correct = securityimagevalue($seed);
     if (strtolower($_POST['securityimage']) != $correct) die("You did not type the value from the image correctly. Press the back button.");
     chdir($curr_path);      // Return to original directory 
    }
    

    so, your file should stay like this:

        <?php
    $adminemail = 'info@blueriverwm.co.uk'; // type your actual email address in place of you@yourdomain.com
    
    $usesecimage = ''; // the path to a WSN Links, Gallery, KB or Forum install if you wish to borrow its security image prompt
    
    $autoresponse = ''; // type the URL of a text file which should be used as the autoresponder body text
    
    $controlvars = ' thankspage submitteremail ccsubmitter messagetosubmitter ';
    $messagetoadmin = "A user has filled out a form with this content:
    
    
    ";
    
     if (!isset($_POST['messagetosubmitter'])) $messagetosubmitter = "You have submitted a form with the content listed below. Your submission will be reviewed, please be patient in awaiting a response.
    
    
    ";
     else $messagetosubmitter = $_POST['messagetosubmitter'];
    
    while(list($key, $value) = each($_POST))
    {
     if (!stristr($controlvars, ' '. $key .' '))
     {
      $messagetoadmin .= $key .': '. $value .'
    
    ';
      $messagetosubmitter .= $key .': '. $value .'
    
    ';
     }
    } 
    $submitter = $_POST['submitteremail'];
    if ($submitter == '') $submitter = 'info@innco.uk';
    if (strstr($submitter, "\n") || strlen($submitter) > 50) die("Begone, foul spammer.");
    
       session_start();
       if(empty($_POST['TermsOfBusiness']))
       {
        error_reporting(0);
        echo "You must agree to our Terms of Business. Please <a href='javascript: history.go(-1)'>click here</a> to return to the form";
       }
    
    if ($_POST['ccsubmitter'] == 'yes')
    {
     mail($submitteremail, 'Form Submitted: '. stripslashes($_POST['subject']), stripslashes($messagetosubmitter), 'From: '. $adminemail);
    }
    if ($autoresponse != '')
    {
     $body = geturl($autoresponse);
     mail($submitteremail, 'Re: '. stripslashes($_POST['subject']), stripslashes($body), 'From: '. $adminemail);
    }
    header('Location: '. $_POST['thankspage']);
    // just in case redirect doesn't work
    die('<meta http-eqiv="refresh" content="0;url='. $_POST['thankspage'] .'">');
    
    if (!function_exists('geturl'))
    {
    function geturl($url)
    {
     if (extension_loaded('curl')) 
     {
       $user_agent = 'Mozilla/4.0 (compatible; MSIE 6.02; PHP)';
       $ch = curl_init(); 
       curl_setopt ($ch, CURLOPT_URL, $url); 
       curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); 
       curl_setopt ($ch, CURLOPT_HEADER, false); 
       curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); 
       curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15);  // timeout after 5 seconds
       curl_setopt ($ch, CURLOPT_TIMEOUT, 15);  // timeout after 5 seconds   
       curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true); 
       $result = curl_exec ($ch); 
       curl_close ($ch); 
    // curl_error($ch); // for debugging
       return $result;  
     }
    
     if (version_compare("4.3.0", phpversion(), "<"))
     { 
      $filecontents = @file_get_contents($url);
     }
     else
     {
      $fd = @fopen($url, 'rb');
      $filecontents = "";
      do 
      {
       $data = @fread($fd, 8192);
       if (strlen($data) == 0) 
       {
        break;
       }
       $filecontents .= $data;
      } while(true); 
      @fclose ($fd);
     }
     return $filecontents;
    }
    }
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to select an H1 element which is the second-child in its group
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.