{"id":6177,"date":"2016-04-05T15:15:16","date_gmt":"2016-04-05T12:15:16","guid":{"rendered":"http:\/\/instamam.ru\/?page_id=6177"},"modified":"2016-04-05T15:18:07","modified_gmt":"2016-04-05T12:18:07","slug":"test2","status":"publish","type":"page","link":"http:\/\/instamam.ru\/index.php\/test2\/","title":{"rendered":"test2"},"content":{"rendered":"<p><?php\n\/**\n * Working sample code to accompany the library. The instructions here assume\n * you've just cloned the repo. If you've installed via composer, you will want\n * to adjust the path to the autoloader.\n *\n * 1. Run the server. For example, under Linux you can probably use:\n * \/usr\/bin\/php -S \"localhost:8000\" \"examples\/example-captcha.php\"\n * 2. Point your browser at http:\/\/localhost:8000\n * 3. Follow the instructions\n *\n * @copyright Copyright (c) 2015, Google Inc.\n * @link      http:\/\/www.google.com\/recaptcha\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and\/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\/\n\/\/ Initiate the autoloader. The file should be generated by Composer.\n\/\/ You will provide your own autoloader or require the files directly if you did\n\/\/ not install via Composer.\nrequire_once __DIR__ . '\/..\/vendor\/autoload.php';\n\/\/ Register API keys at https:\/\/www.google.com\/recaptcha\/admin\n$siteKey = '6LdWhxwTAAAAANV_VphVKlUgkMVbiEy6ar6ErhTn';\n$secret = '6LdWhxwTAAAAAI0XbrKtBR479sMDTyiyuOoeu1D0';\n\/\/ reCAPTCHA supported 40+ languages listed here: https:\/\/developers.google.com\/recaptcha\/docs\/language\n$lang = 'en';\n?><br \/>\n<html><br \/>\n    <head><br \/>\n        <meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\"\/><br \/>\n        <title>reCAPTCHA Example<\/title>\n        <link rel=\"shortcut icon\" href=\"\/\/www.gstatic.com\/recaptcha\/admin\/favicon.ico\" type=\"image\/x-icon\"\/>\n<style type=\"text\/css\">\n            body {\n                margin: 1em 5em 0 5em;\n                font-family: sans-serif;\n            }\n            fieldset {\n                display: inline;\n                padding: 1em;\n            }\n        <\/style>\n<p>    <\/head><br \/>\n    <body><\/p>\n<h1>reCAPTCHA Example<\/h1>\n<p>        <?php if ($siteKey === '' || $secret === ''): ?><\/p>\n<h2>Add your keys<\/h2>\n<p>If you do not have keys already then visit <tt><br \/>\n            <a href = \"https:\/\/www.google.com\/recaptcha\/admin\"><br \/>\n                https:\/\/www.google.com\/recaptcha\/admin<\/a><\/tt> to generate them.<br \/>\n        Edit this file and set the respective keys in <tt>$siteKey<\/tt> and<br \/>\n        <tt>$secret<\/tt>. Reload the page after this.<\/p>\n<p>    <?php\nelseif (isset($_POST['g-recaptcha-response'])):\n    \/\/ The POST data here is unfiltered because this is an example.\n    \/\/ In production, *always* sanitise and validate your input'\n    ?><\/p>\n<h2><tt>POST<\/tt> data<\/h2>\n<p>    <tt><\/p>\n<pre><?php var_export($_POST); ?><\/pre>\n<p><\/tt><br \/>\n    <?php\n\/\/ If the form submission includes the \"g-captcha-response\" field\n\/\/ Create an instance of the service using your secret\n    $recaptcha = new \\ReCaptcha\\ReCaptcha($secret);\n\/\/ If file_get_contents() is locked down on your PHP installation to disallow\n\/\/ its use with URLs, then you can use the alternative request method instead.\n\/\/ This makes use of fsockopen() instead.\n\/\/  $recaptcha = new \\ReCaptcha\\ReCaptcha($secret, new \\ReCaptcha\\RequestMethod\\SocketPost());\n\/\/ Make the call to verify the response and also pass the user's IP address\n    $resp = $recaptcha->verify($_POST[&#8216;g-recaptcha-response&#8217;], $_SERVER[&#8216;REMOTE_ADDR&#8217;]);<br \/>\n    if ($resp->isSuccess()):<br \/>\n\/\/ If the response is a success, that&#8217;s it!<br \/>\n        ?><\/p>\n<h2>Success!<\/h2>\n<p>That&#8217;s it. Everything is working. Go integrate this into your real project.<\/p>\n<p><a href=\"\/\">Try again<\/a><\/p>\n<p>        <?php\n    else:\n\/\/ If it's not successful, then one or more error codes will be returned.\n        ?><\/p>\n<h2>Something went wrong<\/h2>\n<p>The following error was returned: <?php\n            foreach ($resp->getErrorCodes() as $code) {<br \/>\n                echo &#8216;<tt>' , $code , '<\/tt> &#8216;;<br \/>\n            }<br \/>\n            ?><\/p>\n<p>Check the error code reference at <tt><a href=\"https:\/\/developers.google.com\/recaptcha\/docs\/verify#error-code-reference\">https:\/\/developers.google.com\/recaptcha\/docs\/verify#error-code-reference<\/a><\/tt>.<\/p>\n<p><strong>Note:<\/strong> Error code <tt>missing-input-response<\/tt> may mean the user just didn&#8217;t complete the reCAPTCHA.<\/p>\n<p><a href=\"\/\">Try again<\/a><\/p>\n<p>    <?php\n    endif;\nelse:\n\/\/ Add the g-recaptcha tag to the form you want to include the reCAPTCHA element\n    ?><\/p>\n<p>Complete the reCAPTCHA then submit the form.<\/p>\n<form action=\"\/\" method=\"post\">\n<fieldset>\n<legend>An example form<\/legend>\n<p>Example input A: <input type=\"text\" name=\"ex-a\" value=\"foo\"><\/p>\n<p>Example input B: <input type=\"text\" name=\"ex-b\" value=\"bar\"><\/p>\n<div class=\"g-recaptcha\" data-sitekey=\"<?php echo $siteKey; ?>&#8220;><\/div>\n<p>            <script type=\"text\/javascript\"\n                    src=\"https:\/\/www.google.com\/recaptcha\/api.js?hl=<?php echo $lang; ?>\">\n            <\/script><\/p>\n<p><input type=\"submit\" value=\"Submit\" \/><\/p>\n<\/fieldset><\/form>\n<p><?php endif; ?><br \/>\n<\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>reCAPTCHA Example reCAPTCHA Example Add your keys If you do not have keys already then visit https:\/\/www.google.com\/recaptcha\/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this. Success! That&#8217;s it. Everything is working. Go integrate this into your real project. Try again<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"footnotes":""},"class_list":["post-6177","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>test2 &#8226; InstaMam.ru<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/instamam.ru\/index.php\/test2\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"test2 &#8226; InstaMam.ru\" \/>\n<meta property=\"og:description\" content=\"reCAPTCHA Example reCAPTCHA Example Add your keys If you do not have keys already then visit https:\/\/www.google.com\/recaptcha\/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this. Success! That&#8217;s it. Everything is working. Go integrate this into your real project. Try again\" \/>\n<meta property=\"og:url\" content=\"http:\/\/instamam.ru\/index.php\/test2\/\" \/>\n<meta property=\"og:site_name\" content=\"InstaMam.ru\" \/>\n<meta property=\"article:modified_time\" content=\"2016-04-05T12:18:07+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/instamam.ru\\\/index.php\\\/test2\\\/\",\"url\":\"http:\\\/\\\/instamam.ru\\\/index.php\\\/test2\\\/\",\"name\":\"test2 &#8226; InstaMam.ru\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/instamam.ru\\\/#website\"},\"datePublished\":\"2016-04-05T12:15:16+00:00\",\"dateModified\":\"2016-04-05T12:18:07+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/instamam.ru\\\/index.php\\\/test2\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/instamam.ru\\\/index.php\\\/test2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/instamam.ru\\\/index.php\\\/test2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e\",\"item\":\"http:\\\/\\\/instamam.ru\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"test2\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/instamam.ru\\\/#website\",\"url\":\"http:\\\/\\\/instamam.ru\\\/\",\"name\":\"InstaMam.ru\",\"description\":\"InstaMam.ru\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/instamam.ru\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"test2 &#8226; InstaMam.ru","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/instamam.ru\/index.php\/test2\/","og_locale":"ru_RU","og_type":"article","og_title":"test2 &#8226; InstaMam.ru","og_description":"reCAPTCHA Example reCAPTCHA Example Add your keys If you do not have keys already then visit https:\/\/www.google.com\/recaptcha\/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this. Success! That&#8217;s it. Everything is working. Go integrate this into your real project. Try again","og_url":"http:\/\/instamam.ru\/index.php\/test2\/","og_site_name":"InstaMam.ru","article_modified_time":"2016-04-05T12:18:07+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/instamam.ru\/index.php\/test2\/","url":"http:\/\/instamam.ru\/index.php\/test2\/","name":"test2 &#8226; InstaMam.ru","isPartOf":{"@id":"http:\/\/instamam.ru\/#website"},"datePublished":"2016-04-05T12:15:16+00:00","dateModified":"2016-04-05T12:18:07+00:00","breadcrumb":{"@id":"http:\/\/instamam.ru\/index.php\/test2\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["http:\/\/instamam.ru\/index.php\/test2\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/instamam.ru\/index.php\/test2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e","item":"http:\/\/instamam.ru\/"},{"@type":"ListItem","position":2,"name":"test2"}]},{"@type":"WebSite","@id":"http:\/\/instamam.ru\/#website","url":"http:\/\/instamam.ru\/","name":"InstaMam.ru","description":"InstaMam.ru","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/instamam.ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"}]}},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P79M0p-1BD","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/pages\/6177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/comments?post=6177"}],"version-history":[{"count":4,"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/pages\/6177\/revisions"}],"predecessor-version":[{"id":6181,"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/pages\/6177\/revisions\/6181"}],"wp:attachment":[{"href":"http:\/\/instamam.ru\/index.php\/wp-json\/wp\/v2\/media?parent=6177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}