Raven1992 Posted September 9, 2014 Share Posted September 9, 2014 Hey Make Web Games i got a banner that my friend made for me from another forums free of charge as you can see it got the users online count and it in my signerture but I need to know how can i show how many users are online on my signerture page and how do i embedded the link inside of it so people can click on it would like help please on it here the banner for it [ATTACH=CONFIG]1644[/ATTACH] and here the link that got to be embedded onto it for the user show count to appear and as I dunno where to start as I just got the banner today http://www.hothhotel.eu Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted September 9, 2014 Share Posted September 9, 2014 Take a look at the GD library Quote Link to comment Share on other sites More sharing options...
Raven1992 Posted September 9, 2014 Author Share Posted September 9, 2014 Take a look at the GD library the what kyle Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted September 9, 2014 Share Posted September 9, 2014 Check this out Quote Link to comment Share on other sites More sharing options...
sniko Posted September 9, 2014 Share Posted September 9, 2014 Well, i didn't think he'd deliver - but he did. Â Ensure you have GD library installed. Make sure you have CURL installed. Make sure you have the gif in the same directory as the .php script and name it "hothhotel.gif" Make sure your .php script can be accessed by the public. Â <?php $strPageToScrape = "http://www.hothhotel.eu/index"; $objCurl = curl_init(); curl_setopt($objCurl, CURLOPT_URL, $strPageToScrape); curl_setopt($objCurl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($objCurl, CURLOPT_CONNECTTIMEOUT, 0); $strPage = curl_exec($objCurl); curl_close($objCurl); $arrMatch = array(); preg_match("/<span class=\"stats-fig\">[0-9]*<\/span>/", $strPage, $arrMatch); if( empty($arrMatch) ) { $intPlayersOnline = "-"; } else { $intPlayersOnline = abs( filter_var($arrMatch[0], FILTER_SANITIZE_NUMBER_INT) ); } //Create the image try { $objImage = imagecreatefromgif("hothhotel.gif"); $text = imagecolorallocate($objImage, 255, 255, 255); imagestring($objImage, 5, 450, 10, $intPlayersOnline, $text); Header('Content-Type: image/gif'); imagegif($objImage); imagedestroy($objImage); } catch (Exception $objException) { Header('Content-Type: image/gif'); echo file_get_contents('hothhotel.gif'); } Â For those interested, I didn't do this for money. I did this for something way better than money. Here; I present to you my payment. Here is me proposing the deal; Payment has been attached to this post. Enjoy. A sneak preview; (Holy Sh**. That was fun xD) // Will code for selfies with "sniko" sign and shoe on head. Quote Link to comment Share on other sites More sharing options...
Raven1992 Posted September 9, 2014 Author Share Posted September 9, 2014 Well, i didn't think he'd deliver - but he did. Ensure you have GD library installed. Make sure you have CURL installed. Make sure you have the gif in the same directory as the .php script and name it "hothhotel.gif" Make sure your .php script can be accessed by the public.  <?php $strPageToScrape = "http://www.hothhotel.eu/index"; $objCurl = curl_init(); curl_setopt($objCurl, CURLOPT_URL, $strPageToScrape); curl_setopt($objCurl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($objCurl, CURLOPT_CONNECTTIMEOUT, 0); $strPage = curl_exec($objCurl); curl_close($objCurl); $arrMatch = array(); preg_match("/<span class=\"stats-fig\">[0-9]*<\/span>/", $strPage, $arrMatch); if( empty($arrMatch) ) { $intPlayersOnline = "-"; } else { $intPlayersOnline = abs( filter_var($arrMatch[0], FILTER_SANITIZE_NUMBER_INT) ); } //Create the image try { $objImage = imagecreatefromgif("hothhotel.gif"); $text = imagecolorallocate($objImage, 255, 255, 255); imagestring($objImage, 5, 450, 10, $intPlayersOnline, $text); Header('Content-Type: image/gif'); imagegif($objImage); imagedestroy($objImage); } catch (Exception $objException) { Header('Content-Type: image/gif'); echo file_get_contents('hothhotel.gif'); }  For those interested, I didn't do this for money. I did this for something way better than money. Here; I present to you my payment. Here is me proposing the deal; Payment has been attached to this post. Enjoy. A sneak preview; (Holy Sh**. That was fun xD) // Will code for selfies with "sniko" sign and shoe on head. haha this was the best deal ever Quote Link to comment Share on other sites More sharing options...
Dave Posted September 9, 2014 Share Posted September 9, 2014 This is fabulous. No other word can describe. I'm now accepting hilarious pictures in form of payment. Quote Link to comment Share on other sites More sharing options...
Script47 Posted September 10, 2014 Share Posted September 10, 2014 That's one of the best things I've seen in a while. xD Quote Link to comment Share on other sites More sharing options...
cris_fletches Posted November 26, 2015 Share Posted November 26, 2015 The same opinion. This is the very-well done job. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.