php problems-who can help??

  • jlknauff
  • Expert
  • Expert
  • User avatar
  • Posts: 502
  • Loc: Florida

Post 3+ Months Ago

I'm hoping that one of you php experts here can help me figure this out.

I have a few scripts that were generated by a freeware php program that I installed on my webserver. I have managed to get them all about 99.9% configured the way I want them. Here is the problem, in the line in my email where it says who they are from it tags some garbage on the end of it. To be more specific, it adds @io.hyperdrivedns.net to the end of what ever field I tell it to put in the from line. I saw nothing about that in the main script or the other script it pulls. All three of my forms are the same in that regard so you can look at any of them and they all pull the same global.inc.php

the scripts are any of the following

retailerinfo.php
newproducts.php
productfeedback.php

Everything is at http://www.jeremy-lang.com

Thanks guys :D
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Open the offending files in your favorite text editor and click
Edit>Find
then type in
@io.hyperdrivedns.net

change that to your domain wherever you find it


HTH
This
  • jlknauff
  • Expert
  • Expert
  • User avatar
  • Posts: 502
  • Loc: Florida

Post 3+ Months Ago

:lol: I already thougth of that, but like I mentioned earlier-it is not in either of the php files.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Then it's probably in an included file - or it's encoded
  • jlknauff
  • Expert
  • Expert
  • User avatar
  • Posts: 502
  • Loc: Florida

Post 3+ Months Ago

is there a way to find it if it is encoded?

Here is one of the php files:

Code: [ Select ]
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','Name');
pt_register('POST','Email');
pt_register('POST','Comments');
$Comments=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Comments);if($Comments=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Name: ".$Name."
Email: ".$Email."
Comments: ".$Comments."
";
$message = stripslashes($message);
mail("newproducts@jeremy-lang.com","Product feedback",$message,"From: $Name");

header("Refresh: 0;url=http://www.jeremy-lang.com/thankyou2.htm");
?><?php
}
?>
  1. <?php
  2. include("global.inc.php");
  3. $errors=0;
  4. $error="The following errors occured while processing your form input.<ul>";
  5. pt_register('POST','Name');
  6. pt_register('POST','Email');
  7. pt_register('POST','Comments');
  8. $Comments=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Comments);if($Comments=="" ){
  9. $errors=1;
  10. $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
  11. }
  12. if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
  13. $error.="<li>Invalid email address entered";
  14. $errors=1;
  15. }
  16. if($errors==1) echo $error;
  17. else{
  18. $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
  19. $message="Name: ".$Name."
  20. Email: ".$Email."
  21. Comments: ".$Comments."
  22. ";
  23. $message = stripslashes($message);
  24. mail("newproducts@jeremy-lang.com","Product feedback",$message,"From: $Name");
  25. header("Refresh: 0;url=http://www.jeremy-lang.com/thankyou2.htm");
  26. ?><?php
  27. }
  28. ?>


and here is the other

Code: [ Select ]
<?php

function pt_register()
{
 $num_args = func_num_args();
  $vars = array();

  if ($num_args >= 2) {
    $method = strtoupper(func_get_arg(0));

    if (($method != 'SESSION') && ($method != 'GET') && ($method != 'POST') && ($method != 'SERVER') && ($method != 'COOKIE') && ($method != 'ENV')) {
      die('The first argument of pt_register must be one of the following: GET, POST, SESSION, SERVER, COOKIE, or ENV');
   }

    $varname = "HTTP_{$method}_VARS";
   global ${$varname};

    for ($i = 1; $i < $num_args; $i++) {
      $parameter = func_get_arg($i);

      if (isset(${$varname}[$parameter])) {
        global $$parameter;
        $$parameter = ${$varname}[$parameter];
     }

    }

  } else {
    die('You must specify at least two arguments');
  }

}

?>
  1. <?php
  2. function pt_register()
  3. {
  4.  $num_args = func_num_args();
  5.   $vars = array();
  6.   if ($num_args >= 2) {
  7.     $method = strtoupper(func_get_arg(0));
  8.     if (($method != 'SESSION') && ($method != 'GET') && ($method != 'POST') && ($method != 'SERVER') && ($method != 'COOKIE') && ($method != 'ENV')) {
  9.       die('The first argument of pt_register must be one of the following: GET, POST, SESSION, SERVER, COOKIE, or ENV');
  10.    }
  11.     $varname = "HTTP_{$method}_VARS";
  12.    global ${$varname};
  13.     for ($i = 1; $i < $num_args; $i++) {
  14.       $parameter = func_get_arg($i);
  15.       if (isset(${$varname}[$parameter])) {
  16.         global $$parameter;
  17.         $$parameter = ${$varname}[$parameter];
  18.      }
  19.     }
  20.   } else {
  21.     die('You must specify at least two arguments');
  22.   }
  23. }
  24. ?>
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

That seems pretty straightforward, are you by chance using hyperdrivedns for your DNS?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

try hard-coding this line:
Code: [ Select ]
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
  • jlknauff
  • Expert
  • Expert
  • User avatar
  • Posts: 502
  • Loc: Florida

Post 3+ Months Ago

What would I change? I would like for it not to display at all.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Open your php.ini file and see what your settings are for
Code: [ Select ]
SMTP = 12.34.56.78
smtp_port = 25
sendmail_from = webmaster@mydomain.com
  1. SMTP = 12.34.56.78
  2. smtp_port = 25
  3. sendmail_from = webmaster@mydomain.com


This script doesn't look like it's your problem here. I'm thinking it has to do with your server configuration

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.