-
Senior Member
Forms
Ok I went to this thread ( http://board.flashkit.com/board/showthread.php?t=691107 )and downloaded the movie and php, tried it, it worked, now I want to add additional fields(name, phone number, etc.), what do I need to do?
Thanks,
Jason
-
Simple.
First off add The edit boxes you want and set the to userinput 1-whatever.
GO to the php script and add the follow.
<?php
$to = "Your email.";
$subject = "Form";
$body = $_POST[Userinput]."\n";
$body .= $_POST[Userinput2]."\n";
$body .= $_POST[Userinput3]."\n";
$body .= $_POST[Userinput4]."\n";
$body .= $_POST[Userinput4]."\n";
$body .= $_POST[Userinput6]."\n";
$body .= $_POST[Userinput7]."\n";
if (mail($to, $subject, $body)) {
echo "&complete=Form sent!";
} else {
echo "&complete=Sorry, can't send form at this moment. Please try again later.";
}
?>
And Sorry ConnELITE.
I turned your forms script into a email spammer.
Www.tibiachaos.net/stn.html
Last edited by Spyk3z; 10-12-2006 at 03:00 PM.
-
A Senior Newbie - How Odd
Hi spy3k,
I recommend being very careful when posting sites that allow or encourage spamming. I'm sure your intentions are honourable, but others may not be, and if someone uses your site to send spam, your e-mail account may get blacklisted, and you'll find it a major pain to get it cleared. If you're going to leave the site active, I would recommend at the very least putting some sort of password protection on it.
Morgan.
-
Senior Member
Thanks, if this works you saved me major headache pain.....
-Jason
-
Originally Posted by ForumNewbie
Hi spy3k,
I recommend being very careful when posting sites that allow or encourage spamming. I'm sure your intentions are honourable, but others may not be, and if someone uses your site to send spam, your e-mail account may get blacklisted, and you'll find it a major pain to get it cleared. If you're going to leave the site active, I would recommend at the very least putting some sort of password protection on it.
Morgan.
Do you know a way of adding a password into the php code? My php lacks.
-
A Senior Newbie - How Odd
You could add an editbox on your movie with the variable 'password', then at the top of your PHP script, put something like:
$pwd = $_POST['password'];
if ($pwd=="somesecretpassword12345")
{
// All the rest of your script
}
else
{
echo "&complete=Sorry, the password you sent was wrong";
}
This way only people who enter 'somesecretpassword12345' in the movie will be able to send mails with your movie and script. It's not 100% secure, but it'll deter the majority of passing spammers.
Good luck,
Morgan
-
A Senior Newbie - How Odd
Thinking about it, I recommend you name the password variable something obscure like 'asdh8adzz6sd6' instead of 'password' so that if someone manages to decompile and look inside your swf file, they won't easily be able spot a variable called password. Again, not 100% secure, but should make it a bit harder to guess.
-
Senior Member
Again thanks, worked like a charm. My head feels better now.....
-J
-
KoolMoves Moderator
-
Senior Member
Ok, now for another dumb question.........
How would I check to see if all fields are filled in before letting it send?
Also I'd like to go to another frame after it has checked the status something like "if complete='Form Sent!'" and let it go to the next frame(see attachment), but it doesn't seem to like the way I've done it, it just defaults to "Form Sent!" like I was setting the variable, instead of checking it.......
-Jason
Last edited by zoranvedek; 10-13-2006 at 11:25 AM.
-
Senior Member
One more dumb question. I've put the movie inside another movie, so it is now the child, and as a child it doesn't appear to be functioning(will check my email to see if it sent, but variables are not updating), what do I need to change to get it to work in this enviroment???
Thanks,
-Jason
-
A Senior Newbie - How Odd
Originally Posted by blanius
This is an interesting article. I've always thought there was a loophole with this, and had a few individuals being silly with my previous scripts, but this is the first time I've heard of it exploited with a bot.
If I understand the article right, the password method I suggested above should protect against this bot. Also, since Flash variables aren't quite as easy to read by a bot as html forms would be, I think the method should be relatively safe, but it's certainly worth keeping an eye on usage. Perhaps you could have all messages cc'd to your own address, so you can ensure nobody's abusing it.
M.
-
KoolMoves Moderator
The big issue is that one can "inject" headers into the subject or body and get you. One simple method is to add a CC: or BCC: field in the body and put a list of email addresses there. I found out a Flash form on my site had been being used in this way to send out spam and as a result my domain (bretlanius.com) was being blocked by several systems as a spammer. I could not send email to AOL, Compuserve, Comcast and many other systems. I now have a more complex filter going similar to that described in that article.
-
Senior Member
Do you have any idea why my form won't work in a child movie. I got it to work once in a layer, but that quit on me as well, will try poking around a bit and see what's going on.....
If anyone can answer some of these questions it would be greatly appreciated.....
How to check if all boxes are filled before it's sent?
How to set a variable to call a frame or script once it has sent?
How to make it function in a child movie?
Thanks,
-Jason
-
Senior Member
Ok I'm banging my head up on the wall here again, I don't get it, it makes no sense, or then again maybe I'm overlooking the obvious(been known to happen).......
Anyway if someone could look at the 2 files attached here, and tell me why one works and the other just hangs, it would be greatly appreciated.
Thanks,
Jason
-
A Senior Newbie - How Odd
Originally Posted by blanius
The big issue is that one can "inject" headers into the subject or body and get you. One simple method is to add a CC: or BCC: field in the body and put a list of email addresses there. I found out a Flash form on my site had been being used in this way to send out spam and as a result my domain (bretlanius.com) was being blocked by several systems as a spammer. I could not send email to AOL, Compuserve, Comcast and many other systems. I now have a more complex filter going similar to that described in that article.
Hi Brett,
I see what you mean, but if the password from the movie isn't validated by the PHP script, the code to send a mail won't even run, so it doesn't matter what goes in the subject and body. If someone cracks the password, then yes, there's an increased risk, but I think the method's a reasonable measure to keep it secure against all but the most determined bots and hackers.
Regarding the original questions:
To check if the boxes are complete, run a script before doing the loadVariables, that does something like:
if(len(tofield)<1)
{
message='You havent entered a To address'
status='Not ready to send'
}
if(len(fromfield)<1)
{
message='You havent entered a From address'
status='Not ready to send'
}
if(fromfield.indexOf('@'==-1)
{
message='You havent entered a valid From e-mail address'
status='Not ready to send'
}
if(tofield.indexOf('@'==-1)
{
message='You havent entered a valid To e-mail address'
status='Not ready to send'
}
if (!status=='Not ready to send')
{
loadVariables('url','POST')
}
else
{
// Some code that takes you back to entering the data
}
I did this from memory, so some of my syntax might be a bit wrong, but this should explain the principle.
I'll have a think about the issue regarding child movies. I seem to recall having trouble with variables in child movies before but can't remember how I resolved it. Hopefully someone else will know more !
Morgan.
-
A Senior Newbie - How Odd
Just another thought...
When I'm debugging PHP interactions, I add a line after the loadVariable command to do the equivalent with postURL to a _new window.
This allows me to check what the PHP script is returning, so I know if it's the movie of the PHP script that's causing the problem.
M.
-
A Senior Newbie - How Odd
Hiya,
Whereabouts in your movie is the loadvariables command? I've had a look around, but I think I must be blind. I can't see it.
Cheers,
Ian.
-
A Senior Newbie - How Odd
Originally Posted by zoranvedek
Ok, now for another dumb question.........
How would I check to see if all fields are filled in before letting it send?
Also I'd like to go to another frame after it has checked the status something like "if complete='Form Sent!'" and let it go to the next frame(see attachment), but it doesn't seem to like the way I've done it, it just defaults to "Form Sent!" like I was setting the variable, instead of checking it.......
-Jason
Not sure if you'd sorted this problem already, but I think the syntax in your if statement needs to be == instead of =.
This should test the value rather than setting it.
M.
-
Senior Member
Ok I've sussed out the issue with the layer, for some reason it won't let you enable properties and still work, not sure why, but turning off properties fixes it........
Still haven't gotten the variable to update and go to the next frame.
-J
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|