0

Hello.

Part of a site i am making requires me to get information from an XML feed. I have a function that checks to make sure it can access the feed then get data from a tag in that feed. However, when i call the function using the code below i get:

Fatal error: Exception thrown without a stack frame in Unknown on line 0

Function Code:

//Get users steam name if possible//
function GetSteamName($GetSteamName_Steam64) {
	if((@simplexml_load_file("http://steamcommunity.com/profiles/".$GetSteamName_Steam64."/?xml=1")) && (IsValidSteam64($GetSteamName_Steam64))) {
		$SteamProfileXML = simplexml_load_file("http://steamcommunity.com/profiles/".$GetSteamName_Steam64."/?xml=1");
		$GetSteamName_SteamName = $SteamProfileXML->steamID;
		return $GetSteamName_SteamName;
	} else {
	return false;
	}
}

code that calls it:

$GetSteamUserName = GetSteamName($Steam64);
	if($GetSteamUserName) {
		$_SESSION['SteamName'] = $GetSteamUserName;
		$SteamUserName = " <b>".$GetSteamUserName."</b>!";
	}

also, IsValidSteam64 is just a simple function which shouldn't be effecting anything.

//Do some basic validation on a Steam64 ID//
function IsValidSteam64($IsValidSteam64_Steam64) {
	if(($IsValidSteam64_Steam64 != "") && (IsNum($IsValidSteam64_Steam64)) && ($IsValidSteam64_Steam64 > 9999999999999999)) {
		return true;
	} else {
		return false;
	}
}

//Check If Input Is Numeric//
function IsNum($IsNum_Number) {
	if (!is_array($IsNum_Number)) {
		return (preg_match("/^[0-9]+$/", $IsNum_Number));
	} else {
		return false;
	}
}

Any help would be much appreciated because its been annoying me for hours.

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Monster Killer
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.