This code is ancient.
There is no guarantee that the registered long arrays have been enabled in PHP. $HTTP_*_VARS are deprecated, and will disappear; use the superglobal equivalents of $_* for each of the $HTTP_*_VARS (except files which is just the $_FILES superglobal, not the same pattern as the long array is $HTTP_POST_FILES).
Useragent does not provide the ip address, and the simplest variable that may contain it is the 'REMOTE_ADDR' in the $_SERVER superglobal, not the HTTP_USER_AGENT. Anything user provided is not guaranteed to ever exist, and the $_SERVER superglobal has few guaranteed offsets.
I'd say go find yourself a new mailer script, look particularly for a new version which includes preventative measures for mail injections. All data provided by a client is tainted and should never be trusted.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Location: EVERYWHERE ... YOU JUST NEVER KNOW WHEN I WILL POP UP WHERE
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
even more lost than before
Quote:
Originally Posted by Fou-Lu
This code is ancient.
There is no guarantee that the registered long arrays have been enabled in PHP. $HTTP_*_VARS are deprecated, and will disappear; use the superglobal equivalents of $_* for each of the $HTTP_*_VARS (except files which is just the $_FILES superglobal, not the same pattern as the long array is $HTTP_POST_FILES).
Useragent does not provide the ip address, and the simplest variable that may contain it is the 'REMOTE_ADDR' in the $_SERVER superglobal, not the HTTP_USER_AGENT. Anything user provided is not guaranteed to ever exist, and the $_SERVER superglobal has few guaranteed offsets.
I'd say go find yourself a new mailer script, look particularly for a new version which includes preventative measures for mail injections. All data provided by a client is tainted and should never be trusted.
Sorry, thank moderator ... but I have no idea what you said at all ... but thanks it sounds good just the same
Location: EVERYWHERE ... YOU JUST NEVER KNOW WHEN I WILL POP UP WHERE
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
Thank you !!!!!!!
Quote:
Originally Posted by Labrar
That means that this code is to old. Nobody uses such scripts since PHP4.
But indead this is a popular Codesnippet out of google.
But i guess youre not really in PHP aint ya?
Leave it like that. Its old, but it works.
So dont you care about it.
But in the other hand this is not the way of secure coding.
Really I think I am getting all formats ... just not the lingo? No techie talk for me ... if you get my drift ... NEWBIE
Thank you for helping me ... like the Newbie I am ((hugs)) ... I do appreciate when someone takes that into consideration ... all I have searched for is the perfect form mail ... I guess without having to pay for it ... I can only expect second best ... right??? I mentioned one time in another forum I would pay for help and I got booted ... so I won't do that ever again ... I guess in the long run ... I can't have the information from my old CGI script which I did so love ... and have the same information gathering in a flash / php or whatever format ... ??? Cause I really like the FLASH FORMAT ???
But, really still only want .. the best secure method ... Whatever that is???
You were the only one to really help me and answer me ... I thank you ... be blessed by the Universe ... for your kindness!!!!!!!!
Location: EVERYWHERE ... YOU JUST NEVER KNOW WHEN I WILL POP UP WHERE
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
Help ... I need some help?
Quote:
Originally Posted by Fou-Lu
This code is ancient.
There is no guarantee that the registered long arrays have been enabled in PHP. $HTTP_*_VARS are deprecated, and will disappear; use the superglobal equivalents of $_* for each of the $HTTP_*_VARS (except files which is just the $_FILES superglobal, not the same pattern as the long array is $HTTP_POST_FILES).
Useragent does not provide the ip address, and the simplest variable that may contain it is the 'REMOTE_ADDR' in the $_SERVER superglobal, not the HTTP_USER_AGENT. Anything user provided is not guaranteed to ever exist, and the $_SERVER superglobal has few guaranteed offsets.
I'd say go find yourself a new mailer script, look particularly for a new version which includes preventative measures for mail injections. All data provided by a client is tainted and should never be trusted.
You totally had me sooooo lost
Please, try to understand that most of us who ask for help ... it is because we do not understand what you do ... why forums were created ... was it not?
You have so much potential ... to help others ... just remember the little guy was also once you too ... before you learnt what you learnt ... you asked a lot of questions also from those who taught you ... I seriously don't want to learn your profession ... I just want to run a cool little site ???
With as much protection as I can use ... sorry you didn't understand ... I WAS ASKING FOR HELP???
I did do the Google thing ... for what I wanted ... and it came up ... if it doesn't work ... then tell, show or lead where to go ... don't just leave me hanging ... cause I don't get the lingo
Have a wonderful ... exploration of thoses who need your help ...
I did you give you (Thank you points ... just because)
Definition of HELP
transitive verb
1: to give assistance or support to <help a child with homework>
In your case you need to use $_POST['sender_message'] instead of $HTTP_POST_VARS['sender_message'] because the $HTTP_POST_VARS is old, no longer supported and on most servers disabled.
Similarly to get the users IP you now need to use $_SERVER['REMOTE_ADDR'] instead of the http user agent you were using as that is also deprecated (old).
Hope that makes it easier for you. Any problems please let us know.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
mylvar=new LoadVars(); mylvar.onLoad=function(connected){ if(connected){ trace(this.serveranswer); }else{trace('Cannot connect to the server. Is your Flasmovie in the same folder than your phpfile??\nOtherwise please use an absolute path to it'); } } mylvar.mytesttext='Hello im right here'; mylvar.sendAndLoad('myphpfile.php',mylvar,"POST");
And the php source (save at as myphpfile.php on your server)
PHP Code:
<?php echo "&serveranswer=Your Flashvar has the value: ".$_POST['mytesttext']; ?>
Just try it.
Explanation:
sendAndLoad can be used for both directions. Sending variables to the server, and getting variables from the server. So you can work with them also in your Flashmovie and in your Basescript on the server.
Location: EVERYWHERE ... YOU JUST NEVER KNOW WHEN I WILL POP UP WHERE
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
Sorry ???
Quote:
Originally Posted by Labrar
And it is also easy to understand.
Short example
Actionscript:
PHP Code:
mylvar=new LoadVars();
mylvar.onLoad=function(connected){
if(connected){
trace(this.serveranswer);
}else{trace('Cannot connect to the server. Is your Flasmovie in the same folder than your phpfile??\nOtherwise please use an absolute path to it'); }
}
mylvar.mytesttext='Hello im right here';
mylvar.sendAndLoad('myphpfile.php',mylvar,"POST");
And the php source (save at as myphpfile.php on your server)
PHP Code:
<?php
echo "&serveranswer=Your Flashvar has the value: ".$_POST['mytesttext'];
?>
Just try it.
Explanation:
sendAndLoad can be used for both directions. Sending variables to the server, and getting variables from the server. So you can work with them also in your Flashmovie and in your Basescript on the server.
Going to bed now. Im drunken abit
Party all the time at Key west
lol ... well enjoy the party
I looked at this and thought maybe if I had a drink I might understand it ... I don't understand coding or where to put any of the things you wrote ... I wish I did ... thanks
As many of us said, it wasn't hard work - I just changed $HTTP_POST_VARS to $_POST. I've no idea why you couldn't do that though as its been clearly explained many times.
I've also put in your requested IP address and user agent too.
Usage: Put your email address in where you see @.com and upload.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
Thats not pretty hard to understand.
Just copy the actionscriptcode and paste it to your first frame in root.
Save the phpcode as a phpfile to your server.
Just modify the path in your actionscript that it matches the path to your php file on server and test it