How do you make a Flash-Based CAPTCHA system using PHP with audio (TTS)
How do you make a Flash-Based CAPTCHA system using PHP with audio (TTS)
Last edited by tech_support; 03-04-2007 at 05:13 AM.
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
Is this a trick question? LOL pick one.
One method, I suppose is to make a bunch of sound files that spell out letters and/or numbers. Give them weird names like "Hdnk98w4.wav"
Then put them in a flash file. Use php to decide which file to load at any given time. Use flash to play the file and to check the correct password.
Like randomly select file "aheuihef927287.wav" then use AS:
Where "test" is what the aheuihef927287.wav said when played.Code://This is on a submit button supposing the visitor used an input text box on(release){ if (_root.sound.name == aheuihef927287.wav && _root.input == test){ gotoAndStop("success frame"); } }
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
See the edit.
The confusion comes in I guess in that you don't need php and Flash, either or will do the same thing, and php alone more securely.
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
What I meant was....
Have a flash file eg. generatecaptcha.fla?captcha=[string here] and it'll generate the file.
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
No. Flash can talk to/from php, but Flash will be the display. I have never heard of any ability to use php type parsing to alter a flash file (in the URL meaning no flashfile.swf?captcha=....)
However, you can have the Flash file pull a string from php, and if you have php generate the random string Flash can display it on the page. The URL wouldn't change though.
Unless I am completely off the mark here and don't understand a word you are saying (this wouldn't be your fault)
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
I want Flash to be the display.Originally Posted by BLiZZaRD
But just grab the string (?captcha=[string]) to show it.
If you still don't get me then I'll give you an example:
Say this will be the string:
9886
The filename will be generate.swf?string=9886
and on the page they'll be a flash file with the string
9886
and an audio button for the audio clip.
Note: This is NOT my pin number![]()
Last edited by tech_support; 03-04-2007 at 05:43 AM. Reason: File extension
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
Okay so I did understand you.
Here is how it will work:
String: 9886
filename in address bar will be: generate.swf (actually it SHOULD be generate.html)
on the page it will display: 9886
and a button for audio.
The URL will not change like it does with a php $_GET file, that is all done internally.
You will excuse me as it is about my bed time. I will be at work in about 5 hours, and back at my work computer in about 8. Once there (barring "real work") I will work on a live example for you to test and study.![]()
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Well let's see.... Current time: 5:14PM. 5:14+8 hrs = 1:14am. I'll be asleep by then.
Can you show me then how to play an audio file using Flash?
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
import the sound to your library (file>>import>>to library)
then you have 2 options.
1) drag the sound from your library to the stage directly, and it will be played when that frame is reached.
2) Use Action Script to attach it:
The sound must still be in your library and linkage must be set (right click icon in library >>linkage>>export for action script)Code:mySound.attachSound("idname");
Then you need to also start() and stop() sound see here for details on those.
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Scary results....
The voice is pitched and it's playing a thousand times.
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
Bookmarks