GamerCard Generator 2.0

  • Admin
So with the moving of the website to a new server, I decided to take the time to mostly rewrite the script as I've learned quite a bit of PHP since I began writing the original script back in 2009 and I was always unhappy with the performance of the original and the frequent errors that would pop up in it.

A couple problems have arisen relatively recently that I had to figure a way around. One being that gamercards.xbox.com has apparently IP blocked our server from contacting them. Ironically this seems to have happened in the past month or so, after I installed the Leaderboards on the forums. So I'm having to use a proxy around that, but it itself is causing an issue now and then with the page timing out when I make requests to update the database information.

The other is that Sony for whatever reason has made it so the two API's I had to use for PSN information don't work at all anymore. Using what I learned from scraping the Wii U website for the Miiverse Cards (which was a pain because they use javascript), I was still unable to find a way to scrape the PSN information from the Sony website itself. Right now, I am having to connect to an external website to pull this information in, which seems to work fine.

Right now, I have the main generating script working. Below is the new compared to the old:
Travis.png
Travis.png

As you can see the Wii portion has been taken out completely as we have the Zelda Cards to function in that regards. The good news with that is that it makes the script so much easier to work with. I've also changed the PHP function of how the image is created which means I can use .png with a much smaller file size than before. As you can see the difference between the .PNG format (left) vs the .JPG format on the old (right). Much clearer images. I am not sure how I feel about the new design, as I like that the avatars are now with the system boxes, but part of me feels it is too cluttered. Any opinions would be nice, otherwise it will most likely stay like it is.

What I am working on now is the scripts that run through the database and either update the database with new information, or create the images themselves. The database updating scripts were probably the weak point in the previous setup, so I am working really hard on these to make sure they run efficiently. So far they seem to be doing pretty good though. Just a couple of bugs here and there.

The other big change I did was to the page where the user selects which images they want. No longer, do we have multiple drop down boxes and all that other crap that was taking up space (page size from 380KB+ to 54KB). So adding images will be far easier going forward.
 

Lulu

Kupo!
Senior Member
Nov 9, 2011
1,120
btw travis, I love the new cards! THESE actually ROTATE!
 
Top