Jump to content

skatermike21988

Members
  • Posts

    100
  • Joined

  • Last visited

    Never

About skatermike21988

  • Birthday 02/19/1988

Contact Methods

  • Website URL
    http://www.Insta-Hosting.com

Profile Information

  • Gender
    Male
  • Location
    Florida

skatermike21988's Achievements

Member

Member (2/5)

0

Reputation

  1. I actually just thought of that, unfortunately I can't try it right this second as my host is having issues with simple_xml and is trying to get it resolved.
  2. Ok here's my problem. I use simplexml_load_file to load the following xml file: http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=cerebal%20asassin The file is dynamic and constantly changing and for my purpose I use simple_xml quite frequently. Now when it loads and pulls the data, on the following run it will still pull the same data even though the file has changed and can be noted in a web browser that it has. Is there any way to avoid simple_xml from caching the loaded file? EDITED: mispelled the function, woops
  3. You are awesome, that worked perfect! thank you so much, I finnally have it working! Thank you again. I could have sworn I tried that before, but I guess not. :/ You can see the final output in my original post.
  4. actually as far as the avatar goes i do have it check, if it fails it'll show a blank avatar, but i removed that to actually see why it's failing, the code i have to check it is: <?php if(!$avatar = ImageCreateFromPNG($avatarurl); ) { $avatar = ImageCreateFromPNG("unknown.png"); } ?>
  5. Ok i tried the urlencode but still getting the same errors: Warning: imagecreatefrompng(http://avatar.xboxlive.com/avatar/Cerebal+Asassin/avatar-body.png) [function.imagecreatefrompng]: failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in /home/evenlame/public_html/xboxpremiumthemes.com/gamercard/gamercard1.php on line 45
  6. sorry about the tags, but um right now i don't have it using the part to actually d/l it but the line <?php $avatar_url = "http://avatar.xboxlive.com/avatar/$gamertag/avatar-body.png"; $avatar = ImageCreateFromPNG($avatarurl); imagecolortransparent($avatar, imagecolorallocate($avatar, 0, 0, 0)); imagecopyresampled($image,$avatar, 170, 0, 0, 0, $new_width, $new_height, $width, $height); ?> is where the errors at, now the code I was using to download is: <?php // this must be done somehow how you want $avgamer= md5($gamertag); $filename = "$avgamer.png"; if(!@copy("http://avatar.xboxlive.com/avatar/$gamertag/avatar-body.png",$filename)) { $errors= error_get_last(); echo "COPY ERROR: ".$errors['type']; echo "<br />\n".$errors['message']; } else { echo "File copied from remote!"; } ?> and is located in xbox.php this here is of a image without a space copied: http://xboxpremiumthemes.com/gamercard/0a33a2f1a7fd4eaeff8528050057dc68.png and this is of one with a space copied: http://xboxpremiumthemes.com/gamercard/542346437efbf663b5bcc5d2e669fa2f.png sorry if its still confusing, I just got home from work and am tired, just that this has been driving me batty for weeks
  7. Ok I am having this weird problem, I am using gd to create an xbox live gamercard, the gamercard include the users xbox live avatar. Like so here: Now the url to get the avatar is: http://avatar.xboxlive.com/avatar/PERSONS GAMERTAG HERE/avatar-body.png Now in the above image the users gamertag is semesic and doesn't contain any spaces, but if for say my gamertag which is cerebal asassin where used gd returns an error and does so for any gamertag with a space in it. saying that the image is not a valid png, I have tried copying the file to my site but then when I view just the copied image i get: "The image “http://xboxpremiumthemes.com/gamercard/1e242025290787daf9cc9f682b0a11c5.png” cannot be displayed, because it contains errors." but when the same image is viewed on xbox site it's fine. Also I can copy over the avatars that don't have a space with no problems. I don't seem to know why. It's starting to drive me nuts. My gamercard looks like this because it can't get the avatar. I hope I didn't make any of this super confusing. :/ Here is my code: Imagecreate.php: <? //THESE FILES GET XBOX LIVE DATA, THIS ALL WORKS FINE include'gamercard1.php'; //XBOX RETRIEVE SCRIPT include'cache.php'; mysql_connect("localhost", "evenlame_site", "skater2") or die(mysql_error()); mysql_select_db("evenlame_site") or die(mysql_error()); $query = 'SELECT * FROM `users`'; $result = mysql_query($query) or die('Cannot get data.'.mysql_error()); while ($row = mysql_fetch_assoc($result)) { $gamertag=$row["gamertag"]; include'xbox.php'; if($xml->State=="Unknown") { $error="1"; } if($xbox_service_error=="true") { $error="1"; } createthumb('card.png','tn_av.png',$gamertag,$Info,$Zone,$gamerscore,$AccountStatus,$gamerpic,$Games,$online,$error); } Then here's gamercard1.php <? function createthumb($name,$filename,$gamertag,$Info,$Zone,$gamerscore,$AccountStatus,$gamerpic,$Games,$online,$error){ if($error!="1") { $image = imagecreatetruecolor(290, 168); $image=imagecreatefrompng($name); imagesetthickness ( $image, 5 ); $Info=wordwrap($Info,25); $white = imagecolorallocate($image, 255, 255, 255); if($AccountStatus=="Gold") { $gccolor= imagecolorallocate($image, 255, 226, 104); } elseif($AccountStatus=="Silver"){ $gccolor= imagecolorallocate($image, 185, 185, 185); } $gamerscore = number_format($gamerscore); $font = 'comicbd.ttf'; // Set the TTF font we want to use // This is just a variable set, which we will later use in the imagettftext funciton $gamertag_fontsize = "15"; // Set the size of the font we want to use $fontsize = "8"; // Set the size of the font we want to use $fontsize2 = "12"; // Set the size of the font we want to use // This again is just a variable like above. list($width, $height) = getimagesize($name); $percent = 0.6; $new_width = $width * 1; $new_height = $height * 1; ///////////////////////////////// //////////////////////////////// //THIS PART HERE COMES UP WITH ERRORS ONLY FOR GAMERTAGS WITH A SPACE, I HAVE TRIED ADDING %20 IN PLACE OF THE SPACE WITH NO LUCK //////////////////////////////// //add the avatar $avatar_url = "http://avatar.xboxlive.com/avatar/$gamertag/avatar-body.png"; $avatar = ImageCreateFromPNG($avatarurl); imagecolortransparent($avatar, imagecolorallocate($avatar, 0, 0, 0)); imagecopyresampled($image,$avatar, 170, 0, 0, 0, $new_width, $new_height, $width, $height); //////////////////// /////////////////// //EVERYTHING ELSE BELOW WORKS LIKE IT IS SUPPOSED TO //add the gamerpic $gamerpic = ImageCreateFromPNG($gamerpic); imagecolortransparent($gamerpic, imagecolorallocate($gamerpic, 0, 0, 0)); imagecopyresampled($image,$gamerpic, 10, 9, 0, 0, 64, 64, 64, 64); //make gamerpic apper 3d'ish $gamerpictop = ImageCreateFromPNG('gamertagcover.png'); imagecolortransparent($gamerpictop, imagecolorallocate($gamerpictop, 0, 0, 0)); imagecopyresampled($image,$gamerpictop, 10, 9, 0, 0, 64, 64, 64, 64); $gamesy=10; //DO THE MATH FOR THE GAMES: $numgames=count($Games); if($numgames<=4){ $numgames=$numgames-1; } else { $numgames="4"; } for($i=0; $i<=$numgames; $i++){ $gameimage=$Games[$i]->Game->Image32Url; $gameimage = ImageCreateFromJPEG($gameimage); imagecolortransparent($gameimage, imagecolorallocate($gameimage, 0, 0, 0)); $gameimagecover = ImageCreateFromPNG('gamecover.png'); imagecolortransparent($gameimagecover, imagecolorallocate($gameimagecover, 0, 0, 0)); if($i!=0){ $gamesy=$gamesy+38; } imagecopyresampled($image,$gameimage, $gamesy, 105, 0, 0, 32, 32, 32, 32); imagecopyresampled($image,$gameimagecover, $gamesy, 105, 0, 0, 32, 32, 32, 32); } if($online=="true") { $online = ImageCreateFromPNG('online.png'); imagecolortransparent($online, imagecolorallocate($online, 0, 0, 0)); imagecopyresampled($image,$online, 282, 13, 0, 0, 4, 25, 4, 25); } else { $offline= ImageCreateFromPNG('offline.png'); imagecolortransparent($offline, imagecolorallocate($offline, 0, 0, 0)); imagecopyresampled($image,$offline, 285, 13, 0, 0, 4, 25, 4, 25); } $membertype="$AccountStatus Member"; //ADDS THE TEXT TO THE IMAGE imagefttext($image, $gamertag_fontsize, 0, 78, 25, $gccolor, $font, $gamertag); imagefttext($image, $fontsize, 0, 78, 40, $white, $font, $Info); imagefttext($image, $fontsize, 0, 115, 90, $white, $font, $Zone); imagefttext($image, $fontsize, 0, 25, 90, $white, $font, $gamerscore); imagefttext($image, $fontsize2, 0, 45, 155, $gccolor, $font, $membertype); $filename="gamercardimages/$gamertag.png"; imagepng($image,$filename); imagedestroy($image); } }
  8. well with the colors i'm trying to go with some xbox related colours. the dark gray header is from a popup when a friend is online, something finished downloading, an achievement unlocked etc. and the gold and silver are from the different types of xbox live accounts. gold for paying, silver for free. I do agreewith the font colors, just trying to figure out what would look attractive, but simple
  9. OK, I'm working on a new project. Here's a little description: When microsoft updated the xbox last month they upgraded the xbox dashboard themes also, for those that don't know what the dashboard is it is like your PC desktop, and the themes are like the background. Well they raised prices on said themes but there currently is no way possible to preview before you buy asides from googleing and digging through forum posts. So I'm making a site to provide users with screenshots. So I just registered my domain Saturday and have a basic layout. Of course I'll be doing some rearranging etc. But i want to know how people feel about the overall look of the site so far. It is currently only one page. So there are no links at the moment. My plan is to define a layout that's appealing before going onto functionality. Anyways here is the link. I appreciate all feedback. http://www.xboxpremiumthemes.com/site
  10. Hello everyone, I am creating a script that when a user signs up they have the option to input their xbox live gamertag. With the gamertag I pull their gamercard to display on their profile. Well I am trying to make a leaderboard that displays leaders by their gamerscore. So.. I have made a cron job that checks and gathers the required info and inserts it into the mysql which works fine. At the very end of the cron job I have it update their rank position which is where I am having the problem. The code looks like this for the update: $getrank = mysql_query("SELECT * FROM xboxleaderboard ORDER BY `gamerscore` DESC;"); $rank=0; while($info = mysql_fetch_array( $getrank )) { $userid = $info['userid']; $rank=$rank+1; $updaterank = "UPDATE `xboxleaderboard` SET `rank` = '$rank' WHERE userid = '$userid'"; $updaterankresult = mysql_query($updaterank); } the $rank adds fine but mysql is not pulling the data right my database looks like this: -------------------------------- gamerscore| gamertag | rank -------------------------------- 450 |skatermike219 | 1 21922 |NeutralX2 | 3 36607 |Gemini711 | 2 --------------------------------- That's what it looks like after the script runs as you can see skatermike219 should not be ranked number 1 and of course Gemini711 should not be ranked number 2 it should be: -------------------------------- gamerscore| gamertag | rank -------------------------------- 450 |skatermike219 | 3 21922 |NeutralX2 | 2 36607 |Gemini711 | 1 -------------------------------- Any help appreciated this is really starting to bug me. Thanks
  11. 1.)Had a hard time finding icons, but definately noted and will be replaced thanks. 2.)I am horrible at photoshop so that will also be replaced. 3.)Never did check it at smaller resolutions but I just did and I agree. 4.)I know of only one place when you first login that the boxes are different sizes I will fix, but if you seen any more can you please inform me, thanks. I appreciate your oppinion and will take note of everything said. Thanks
  12. If you don't mind me asking, but was there anything you clicked on to bring you to this link?
  13. Hello, I have just finished making a WHMCS template and would like some critic. Here is the url http://www.insta-hosting.com/custom/whmcs/ Demo account: USER: demo PASS: demo Thanks all
  14. Hello, I have just finished making a customized whmcs template and would like to make sure everything works like it should. Here is the link: http://www.insta-hosting.com/custom/whmcs/ If you would like to log in and view the members area here are demo details: USER: demo PASS: demo Here is how things should look: 1.) Login box, navigation, and bread crumb should showup in the header. 2.)When logged in, if javascript is enabled, when clicking show links, client links should drop down. Those are the main things I am looking to make sure are right. If you find any problems please post, when posting could you possibly include what browser you where using when the problem occured. Thanks everyone.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.