php - JSON response not working correctly -


so fixed thank has tried me problem lied webhost company with, has anti-bot protection not allow api requests turned off , works charm thank you...

hi i'm not sure if me current problem im making game in ue4 (unreal engine), , using json plugin, when created working on localhost using (bitnami), migrated on webhost , not working, instead of getting json response keep getting error.

logvarest: response (200):

   <html>    <body>       <script type="text/javascript" src="/aes.js" ></script><script>function tonumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseint(d,16))});return e}function tohex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].tostri          ng(16);return e.tolowercase()}var a=tonumbers("f655ba9d09a112d4968c63579db590b4"),b=tonumbers("98344c2eee86c3994890592585b49f80"),c=tonumbers("f9b00f3e868697192212c57f65c86932");document.cookie="__test="+tohex(slowaes.decrypt(c,2,a,b))+"; expires=thu, 31-dec-37 23:55:55 gmt; path=/"; document.cookie="referrer="+escape(document.referrer); location.href="http:          //gametest.wwhost.ga/gameinfo.php?user=youtube&password=youtubelogin&ckattempt=1";       </script>       <noscript>this site requires javascript work, please enable javascript in browser or use browser javascript support</noscript>    </body> </html> 

however if put json string browser result .

link json string

result

{ "result":"success", "regkey":"29cf47b512c72315e82d586b88fa4a2249ce27ae2a0fd67c40b13dae3e438b241b76e52e0d43e440f098e75ddc04d36457fb64feccbee5b70d4054408e2444aa", "banned":"no" } 

if can great

it looks website`s backend checks user-agent before sending response. can add user-agent header request.

for example user-agent: mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/51.0.2704.63 safari/537.36.

i guess plugin this:

request->setheader(     text("user-agent"),     "mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/51.0.2704.63 safari/537.36" ); 

or if it's website can disable user-agent request filter.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -