Xbox 360 Gamertag API SourceJanuary 14, 2012, 6:01 pm - 0 comments
I've decided to release the source code to the Xbox 360 Gamertag API on GitHub. So, without further ado:
flotwig/Xbox-360-Gamertag-API - GitHub
If you add any features, or fix any bugs, consider forking it and sending a pull request so that the original source can be improved. It's very sloppily coded at the moment.
Installing nginxDecember 17, 2011, 12:05 am - 0 comments
Recently, I noticed that my low-end VPS was frequently dying because of the memory limit. I uninstalled a lot of stuff (FTP, rpcbind, oidentd, etc.) and I even replaced rsyslogd with a less resource-intensive equivalent. By this point, I was obsessed with filing down my VPS's memory usage so I asked around for suggestions on how to reduce it. A recurring suggestion was to replace Apache with the popular Russian web server, nginx (pronounced Engine X). So, I installed nginx from the Debian package repo and set it up to listen on port 81 until I had configured it completely.
I configured nginx to run two worker processes and to run as the existing Apache user (www-data) to prevent permission conflicts in existing scripts. When I was setting up vhosts, I found it useful to have a central configuration file so I could configure a domain in five lines, like so: server {
server_name example.com;
root /var/www/example.com/;
include allsites.conf;
}Weird as it might sound, I actually enjoyed configuring nginx. The process is extremely logical and well-documented. The only weird thing was the loss of .htaccess, but even that wasn't a big deal because you can just configure all that stuff under your VirtualHosts. mod_rewrite functionality is replicated perfectly by the rewrite directive, which even uses most of the same syntax.
The only difficult part of installing nginx was getting PHP to work. Since nginx has no "mod_php" like Apache does, you have to run a PHP-FPM server concurrently so that nginx can pass PHP requests via FastCGI to it. If you're on Debian, you won't find PHP-FPM in your default package repos. I highly recommend that you add the DotDEB report to your sources.list, they have up-to-date versions of nginx and PHP-FPM. Debian's most recent version is 0.7, and DotDEB has the latest 1.0 revision.
Anyways, yeah. There's that. I've shaved off about 10MB from my RAM usage without any loss in performance - indeed, the sites on this server seem even snappier than usual.
Server MoveOctober 12, 2011, 12:14 pm - 0 comments
I've moved this website and all of the associated stuff over to a new dedicated VPS. Everything should be working fine.
I've never been a big command line user. I mean, sure, I can use it, but I'd rather be working with GUIs. To help me set up Apache and MySQL and PHP and some of the other stuff I have going on here, I've installed Webmin. Webmin is an free open-source web-based system-management software. I know that's a lot of hyphenations, but it's a lot cooler than I'm making it sound. Webmin basically lets you administrate your server through a web interface. It's probably the only reason that I was able to get most sites up and running in the first day.
For the Xbox 360 Gamercard website, I encountered a problem. The stock installation of PHP that comes with the Debian web server package does not include the GD library. I spent at least an hour trying to compile the GD library by hand. Then, as a last-ditch effort, I typed the following into my SSH console: apt-get install php5-gd I then proceeded to facepalm. After a quick reboot of Apache, the images were generating perfectly.
The next problem presented itself when I uploaded the CloudFlare-enabled site, NiftyHost.us. Everything worked fine on our side, however, CloudFlare was slowing down load times by up to ten seconds and it was showing "502 - Bad Gateway" errors frequently. Maybe CloudFlare's getting overloaded or something, I don't know. I have disabled CloudFlare for the time being.
Xbox 360 Gamercard CreatorJuly 7, 2011, 5:04 pm - 7 comments
A month ago I wrote and published the
Xbox 360 Gamertag API, which is an API that allows programmers to access gamertag information. One month later, I have mostly completed an example that uses said API: the Xbox 360 Gamercard Creator. It outputs images for use as signatures on forums and stuff. Here's an example:

You can go on over and check it out yourself at:
http://experiments.chary.us/gamercard
Introducing the Xbox 360 Gamertag APIJune 5, 2011, 12:27 pm - 15 comments
A few days ago, I was interested in making a website that would allow Xbox Live members to easily form and manage clans or guilds or what have you without very much trouble. Unfortunately, Microsoft has (of course) closed off access to useful APIs to those chosen few who are both rich enough to pay the fees and lucky enough to be accepted by Microsoft. Knowing that I was neither of those, I set out to create a third-party API created by using content-scraping techniques. Not the best of solutions, but I think it'll be as far as I will get. So without further ado, I introduce the Xbox 360 Gamertag API.
To access it is simple. Just request http://360api.chary.us/?gamertag=<your gamertag here> and parse the returned JSON string. You can find more information about the return format at the API structure page I've put up. Have fun!
P.S. Sorry about the lack of an XML format, it's just too much of a headache. If anybody has an easy solution to turn a PHP array into valid and easy to read XML, I'd like to hear it.
|