{"id":806,"date":"2016-02-17T14:52:29","date_gmt":"2016-02-17T05:52:29","guid":{"rendered":"http:\/\/nantoka.filmm.info\/blog\/?p=806"},"modified":"2016-02-17T14:52:29","modified_gmt":"2016-02-17T05:52:29","slug":"%e3%82%b9%e3%82%b3%e3%82%a2%e3%82%92%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8bphp","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=806","title":{"rendered":"\u30b9\u30b3\u30a2\u3092\u8ffd\u52a0\u3059\u308bPHP"},"content":{"rendered":"<p>Unity\u304b\u3089\u547c\u3073\u51fa\u3057\u305f\u30b5\u30fc\u30d0\u5074\u306b\u8a2d\u7f6e\u3059\u308bPHP\u3067\u3059<\/p>\n<pre class=\"lang:default decode:true\" title=\"addscore.php\">&lt;?php \r\n        $db = mysql_connect('severurl', 'sq_lusername', 'sql_password') or die('Could not connect: ' . mysql_error()); \r\n        mysql_select_db('sql?database_name') or die('Could not select database');\r\n \r\n        \/\/ Strings must be escaped to prevent SQL injection attack. \r\n        $name = mysql_real_escape_string($_GET['name'], $db); \r\n        $score = mysql_real_escape_string($_GET['score'], $db);\r\n\t\t$cName = mysql_real_escape_string($_GET['cName'], $db); \r\n        $hash = $_GET['hash']; \r\n \r\n        $secretKey=\"****\"; # Change this value to match the value stored in the client javascript below \r\n\r\n        $real_hash = md5($name . $score . $cName . $secretKey); \r\n        if($real_hash == $hash) { \r\n            \/\/ Send variables for the MySQL database class. \r\n            $query = \"insert into scores values (NULL, '$name', '$score', '$cName');\"; \r\n            $result = mysql_query($query) or die('Query failed: ' . mysql_error()); \r\n        } \r\n?&gt;<\/pre>\n<p>\u30b9\u30b3\u30a2\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unity\u304b\u3089\u547c\u3073\u51fa\u3057\u305f\u30b5\u30fc\u30d0\u5074\u306b\u8a2d\u7f6e\u3059\u308bPHP\u3067\u3059 &lt;?php $db = mysql_connect(&#8216;severurl&#8217;, &#8216;sq_lusername&#8217;, &#8216;sql_password&#8217;) or die(&#8216;Co &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=806\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u30b9\u30b3\u30a2\u3092\u8ffd\u52a0\u3059\u308bPHP<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,2],"tags":[],"class_list":["post-806","post","type-post","status-publish","format-standard","hentry","category-php","category-unity"],"_links":{"self":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=806"}],"version-history":[{"count":1,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/806\/revisions"}],"predecessor-version":[{"id":807,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/806\/revisions\/807"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}