Welcome to the [HSX] website!

Been Gaming since 2003

Community Driven Site

Gaming, Web Development, and Support

  

 
Main Menu
 
DFG
 Home
 Join our Clan
 [HSX] Roster
 BF3 Stats
 Forums
 News
 Downloads
 News Letter
 Video tutorials
 Supporters
 Uploads
 F.A.Q
· FAQ
· Docs
· Forums FAQ
 [HS] History
 PHP Nuke Tools
 WhoIS Lookup
 Site Map
 Write a Review
 Image Repo
 Logout
DFG
DFG DFG DFG

 
[HSX] Donations
 
DFG
Donation
This here is a combined total of what we need to keep us going each month.

48 %

Donate

End DateJul 01
Target$50.00
Below Target$26.03
CurrencyUSD

Donators This Month
Jun 04Rips$23.97
DFG
DFG DFG DFG

 
 Search our Site
 
DFG DFG
DFG DFG DFG

 
Theme Management
 
DFG


DFG
DFG DFG DFG

 
Survey
 
DFG What is your favorite game to play ATM?

WarThunder
World of Tanks
H1Z1
MechWarrior Online
ARK
WarFace
SWTOR
BattleField serier
COD Series
Diablo
Armored Warfare



Results
Polls

Votes 777
Comments: 0
DFG
DFG DFG DFG

 
Honey Pot
 
DFG
Bots in the pot!
We have [1459] bots stopped!

DFG
DFG DFG DFG

     
DFG HeadShot Extreme :: View topic - Implementing Flags into your site


Search for at
HeadShot Extreme Advanced Search

Implementing Flags into your site
Post new topic    Reply to topic    printer-friendly view   Thank Post    HeadShot Extreme Forum Index -> PC & Codeing Talk
View previous topic :: View next topic  
Author Message
[HSX]coRpSE
Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.

coRpSE
Currently Offline
Last Seen Online:
8 hrs, 48 mins ago

Most Played:
This week: 3.6hrs.
Total played: 1,063hrs.


  
Are you really commited?



  • » Show Info «


Status: coRpSE is offline
Post Posted: Sun Oct 23, 2016 5:08 pm Post subject: No icon Implementing Flags into your site Reply with quote

This here is a section for the tutorial that has been requested on the code used to display the flags on blocks and what not from their IP. This is code that is taken right from the Honeypot and I go over a bit in the video on what it does. Implementing it will take a bit of advance knowledge of how coding is, but I hope it helps some of you get on your way to improving not only your site, but your coding skills.

Below is the code I go over in the video and is taken right from my Honeypot script.
Link to the video tutorial:
Please login to see this link
Get registered or Log in


Here is the function:
PHP:
function get_country_info($tempip)
  {
    global 
$prefix$db;
    
$tempip str_replace(".*"".0"$tempip);
    
$tempip sprintf("%u"ip2long($tempip));
    
$result $db->sql_query("SELECT * FROM `".$prefix."_nsnst_ip2country` WHERE `ip_lo`<='$tempip' AND `ip_hi`>='$tempip' LIMIT 0,1");
    
$countryinfo $db->sql_fetchrow($result);
    
$db->sql_freeresult($result);
    return 
$countryinfo;
  } 
 



Here is the call on the function and displaying the flag and country name.
PHP:
$ip2c get_country_info($row['ip']);    
    
  if (!empty(
$ip2c['c2c'])){
    if(
file_exists("./images/info/flags/".strtolower($ip2c['c2c']).".png")){
        echo 
"<img src=\"images/info/flags/".strtolower($ip2c['c2c']).".png\" border=\"0\" alt=\"".ucfirst (strtolower($ip2c['country']))."\"
         title=\""
.ucfirst (strtolower($ip2c['country']))."\" style=\"max-width: 20px; max-height:15px;\" />&nbsp;";
      }else{
        echo 
"<img src=\"./images/info/flags/not_available.png\" border=\"0\" alt=\"".ucfirst (strtolower($ip2c['country']))."\"
         title=\"Missing flag for country c2c code of "
.ucfirst (strtolower($ip2c['c2c'])).", report to coRpSE of headshotdomain.net\"
          style=\"max-width: 20px; max-height:15px;\" />&nbsp;"
;
      }
    }else{
       echo 
"<img src=\"images/info/flags/unknown.png\" border=\"0\" alt=\"UnKnown\" title=\"UnKnown\" 
       style=\"max-width: 20px; max-height:15px;\"/>&nbsp;"
;
 } 
 


hope this helps some of you.


Expand
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
Sp0rAdiC
NOOB!!!
NOOB!!!





This user has donated to the clan.



  • » Show Info «


Status: Sp0rAdiC is offline
Post Posted: Sun Oct 23, 2016 8:00 pm Post subject: No icon Re: Implementing Flags into your site Reply with quote

Very Cool coRpSE!! Thanks for posting the code and tut! I've been trying to figure out how yall did this forever  kopfnuss
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
[HSX]coRpSE
Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.

coRpSE
Currently Offline
Last Seen Online:
8 hrs, 48 mins ago

Most Played:
This week: 3.6hrs.
Total played: 1,063hrs.


  
Are you really commited?



  • » Show Info «


Status: coRpSE is offline
Post Posted: Sun Oct 23, 2016 8:50 pm Post subject: No icon Re: Implementing Flags into your site Reply with quote

Sp0rAdiC wrote (View Post):
Very Cool coRpSE!! Thanks for posting the code and tut! I've been trying to figure out how yall did this forever  kopfnuss


No problem. I would like to put this function in the Evo CMS by default. I would need to discuss that with Lonestar if he thinks that should be in by default.


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
Sponsor
Sp0rAdiC
NOOB!!!
NOOB!!!





This user has donated to the clan.



  • » Show Info «


Status: Sp0rAdiC is offline
Post Posted: Sun Oct 23, 2016 9:28 pm Post subject: No icon Re: Implementing Flags into your site Reply with quote

coRpSE wrote (View Post):

No problem. I would like to put this function in the Evo CMS by default. I would need to discuss that with Lonestar if he thinks that should be in by default.


Seems like a good idea.


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
Ghostwarrior
Spammer
Spammer







  • » Show Info «


Status: Ghostwarrior is offline
Post Posted: Sun Oct 29, 2017 2:48 pm Post subject: No icon Re: Implementing Flags into your site Reply with quote

Hey Corpse, where do I exactly place this code script into my CZUser-Info? I'm trying to have mine CZUser-Info showing like your with the flags and Ips at the bottom. I'm not good at this as you already know this but I'm trying!....

Can you tell where I suppose insert this code script?

Thanks Corpse!....


Ghostwarrior
Back to top
View user's profile Send private message
HeadShot Domain, Been in buisness for over 10 years...
Display posts from previous:
Post new topic   Reply to topic   printer-friendly view   Thank Post HeadShot Extreme Forum Index ->  PC & Codeing Talk All times are UTC - 7 Hours [DST enabled]
Page 1 of 1
 


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Announcement: Name Change 4 Sephiroth 2001 Wed Mar 19, 2014 3:38 pm
Spartacus1968 View latest post
No new posts Downloads-V1.2.1 Comment 2 MAGNET 309 Wed Dec 13, 2017 4:06 pm
MAGNET View latest post
No new posts right block image error 2 worfwarrior 485 Wed Jun 14, 2017 3:08 pm
coRpSE View latest post
No new posts Float Left & Right along with Skicky Note bbcode 10 coRpSE 3744 Sat Feb 27, 2016 12:13 am
coRpSE View latest post
No new posts Nuke Treasury V1.1.2 5 Sp0rAdiC 1252 Sat May 16, 2015 6:04 pm
coRpSE View latest post
 




Powered By: phpBB © 2001 - 2008 phpBB Group
SimpleBlack V2 By: killigan
© DarkForge Graphics 2008 - 2009 All Rights Reserved

Googlepage: GooglePullerPage
DFG
DFG DFG DFG
Forums ©
Copyright © HeadShotDomain 2016 By: coRpSE
SimpleBlack V2 By: Killigan
Powered By: Evolution-Xtreme