NEW RESOURCE LINK IS HERE:
http://xenforo.com/community/resources/steam-authentication-integration.1336/
------------------
So I think I managed to put a band-aid over some bugs... I looked at this with fresh eyes (sorry that it took so long, ended up moving all the way across the country).
This seemed to fix my cron errors. I can't guarantee that it's bug free, but... yeah. Seems to be working for the moment.
Here's what I did so far:
1) I added some IF statements to Steam.php
PHP:
if (strpos($result,'<!DOCTYPE html>') !== false)
{
$xml = '';
}
else
{
$xml = simplexml_load_string($result);
}
This code
should figure out if steam passed you a website that was unavailable and completely skip using simplexml_load_string (unless you're using safe_mode and open_basedir isn't set, sorry guys that aren't able to edit their php.ini). This means that some game data for users may not get updated in MySQL, but at least it won't error out. It's the only compromise I can make with the current code to leave the features in play on such short notice.
2) Fixed a bug with commas
It turns out, the other thing steam.php was doing was messing up queries. If a user had a comma in their number of hours played. The SQL query would explode.
So I added this into each game check to sanitize the data.
PHP:
$hours = str_replace(",", "",$hours);
$hoursRecent = str_replace(",", "",$hoursRecent);
I'm currently in the process of also attempting to code some sort user friendly message to tell them that it failed to load from steam instead of "A server error occurred. Please try again later."
I am also looking into fixing the registration problems by using the Steam API (API key will be required). I'll have a fix for this as soon as I can get it working on my site.
Update 12/30/2012: I think I have JSON working properly for registration (woot!). Now to implement an API input box in the admin CP so you guys don't have to hard code your API Key In. This will be unofficial release 1.0.8. If it works, I'd like to see about branching this into a new resource. Next stop will be seeing how to improve the steam badges. I won't make any promises on fixing the steam badges completely as it's a third party tool. Chances are, I have to hunt down a steambadge solution that uses JSON over XML.
Update 12/30/2012 5AM PST: A live version of 1.0.7d is currently running on my
website (language warning, sorry). Please try testing it out by attempting to register and attempting to associate and disassociate your account. If things are stable, I'll release the beta build to you guys. 1.0.8 will be rolled out once beta is confirmed working and good.
Update 12/30/2012 7AM PST: One more surprise involving the upcoming build before I get some rest this morning. I've put in another option in the Admin Control Panel. This one lets you decide if you want to grab XML information for games. If it's unchecked, the code will just be skipped and no XML information will be taken and your MySQL database won't be queried. Great for when you want to avoid pounding the steam community servers and don't care about game statistics for your users.