Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / HttpResponse Problem

Author
Message
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 15th Jul 2012 09:46
Hi

Has anyone got a simple PHP page example that they'd be willing to share please that sends an HttpResponse back to their AppGameKit app?

I have the following which I've taken from a number of forums:

HttpResponse::setCache(true);
HttpResponse::setContentType('text/plain');
HttpResponse::setData("Some data");
HttpResponse::send();

Nothing is returned to my AppGameKit app with the above code and when I refresh the page in the browser I get a "Class 'HttpResponse' not found in..." error. I've seen many posts which suggest this appears because PECL and HttpResponse isn't installed on the server.

I've contacted my host GoDaddy and they say nothing is wrong with my hosting account and that it may be a problem with the above code, and that they don't help with customers scripts. Unfortunately they haven't yet confirmed whether or not PECL and HttpResponse is installed on my hosting package.

It'll be good to see the basic of PHP pages (with all sensitive/private game code removed) which you're using for your AppGameKit app and that works with the AppGameKit HTTP commands so that I can see if it is indeed a problem with my code or the server.

Thanks

the12thplaya
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 15th Jul 2012 15:33
GoDaddy.com have confirmed that the relevant scripts needed for this aren't installed on my shared hosting account, and can't be. For this I'd need to upgrade to a virtual dedicated server where I can install what's needed myself, or set up my own locally hosted web server on my laptop until I decide whether or not it's worth upgrading.

Hopefully the above code is fine, but if you can spot any problems then please let me know. I don't actually know how I'd construct the data where it says "Some Data" and how he AppGameKit app could use it but I will give it a go later in the week when I set up a local host.

the12thplaya
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 16th Jul 2012 21:33
if you like I can host up the php page for you to test against...

Login to post a reply

Server time is: 2024-04-20 09:45:51
Your offset time is: 2024-04-20 09:45:51