這是用Action Script 2.0發POST資料給一個網址的範例.....
Action Script
on (release) {
myVars = new LoadVars();
myVars.username = "ggyy";
myVars.password = "aaaaaaaaaaaaaaaaa";
myVars.sendAndLoad("http://localhost:1234/test.php", myVars, "POST");
}
myVars = new LoadVars();
myVars.username = "ggyy";
myVars.password = "aaaaaaaaaaaaaaaaa";
myVars.sendAndLoad("http://localhost:1234/test.php", myVars, "POST");
}
----------------------------------------------------------------------------------------------
test.php
$sql = "INSERT INTO `test` (`id`, `username`, `date`, `password`) VALUES (NULL, '".$_POST['username']."', NOW(), '".$_POST['password']."');";
db_query($sql);
db_query($sql);
reference
http://stackoverflow.com/questions/231693/post-login-with-actionscript-2-0
沒有留言:
發佈留言