2014年7月10日星期四

Unity Android facebook hash SSL problem

Download and install OpenSSL.
Add the OpenSSL directory to your path.
  • Go to: Control Panel > System > Advanced system settings > Environment Variables
  • Select the Variable "Path" in the "System variables" window and click Edit.
  • Add the path to your OpenSSL bin folder to the end of the "Variable value" text. e.g. I added ";C:\Program Files\OpenSSL-Win64\bin" to the end of the value text.
Restart Unity3D.
If you get the error in FacebookSettings "Keytool not found", you need to add the JDK (Java Development Kit) bin directory to the Path variable value.
  • Follow the same steps as before, but instead of the OpenSSL bin path, add the JDK bin path. e.g. I added ";C:\Program Files\Java\jdk1.7.0_45\bin" to the end of the value text.


If error occurred after restart unity
go to Control Panel > advanced system setting > environment variables
edit "Path" to C:\Windows\System32;C:\Program Files\Java\jdk1.7.0_51\bin;C:\OpenSSL\bin

2014年5月5日星期一

php sql injection prevent

mysql_real_escape_string($value)

php get value from url

for example url.com?code=abc

$active = htmlspecialchars($_GET["code"]);

$active = abc;

javascript count down and redirect

<html>
<head>
<script type="text/javascript">
var counter = 5;
setInterval(function() {
counter--;
if(counter < 0) {
window.location = 'index.php';
} else {
document.getElementById("count").innerHTML = counter;
}
}, 1000);
</script>
</head>
<body>
<?php echo $msg ?><b id="count">5</b> seconds.
</body>
</html>

QR Generator Download

http://systemtest.webuda.com/QR_Gen.rar

SQL insert value

INSERT INTO table_name (column1,column2,column3,...)
VALUES (value1,value2,value3,...);