Home Accessibility Courses Diary The Mouth Facebook Resources Site Map About Us Contact
World Flags in your PHP pages

The world's flags are often used to give a quick visible international indication of countries (sidestepping the issue I had yesterday, where I was translating into ten languages and wanted links to each other language on each page and - well - what IS the Finnish for Italy?)

So I have found an Icon set for free download and installed all the flags - let me test it out by listing (flaggily) the countries I have trained / visited on business/ visited just for pleasure: . But I suspect there are one or two there which you'll find aren't in the common 'vocab'.

I have also added the flags on our "Do you train in my country?" page at http://www.wellho.net/resources/countries.html, having the server (in PHP checking) that we actually HAVE a flag before we try and send it out. Just missing East Timor, Yugoslavia (but we have several of the countries that have come out of YU in the list above!), Zaire (reason unknown), and Antarctica. By adding this dynamic check into PHP, we're able to add flags and take them away without having to go through and change the script line by line ... and without risk of broken image icons! Here is a code snippet (yes, I am using the MaxMind GeoIPLite API and the array of country codes that it gives me!).

$flower = strtolower($GEOIP_COUNTRY_CODES[$k2]).".png";
if (file_exists("$_SERVER[DOCUMENT_ROOT]/flag/$flower")) {
   print "<td class=body><img src=http://www.wellho.net/flag/$flower> ";
} else {
   print "<td class=body>    ";
}


The flags are in the public domain, so there is no requirement for me to attribute them. However, I would like to thank Mark James for providing them here, and I'm going to quote his copyright statement from another of his icon sets, as I like what he does and how he says it: I love to hear of my work being used, feel encouraged to send an email with a link or screen shot of the icons in their new home to mjames at gmail dot com. This work is licensed under a Creative Commons Attribution 2.5 License. This means you may use it for any purpose, and make any changes you like. All I ask is that you include a link back to this page in your credits if possible.
(written 2009-08-10, updated 2009-08-12)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
H304 - PHP - DDA, Style and image handling
  [3747] An easy way to comply with the new cookie law if your site is well designed - (2012-06-02)
  [2917] Upload Image, Store in database, redisplay in browser. PHP and MySQL - (2010-08-12)
  [2715] Uploading an image, document or pdf via a browser (php) - (2010-04-10)
  [2539] Changing Images - (2009-12-17)
  [2031] Choosing from an image with an image map - (2009-02-08)
  [1506] Ongoing Image Copyright Issues, PHP and MySQL solutions - (2008-01-14)
  [806] Check your user is human. Have him retype a word in a graphic - (2006-07-17)

H306 - PHP - Who is your visitor?
  [3946] Moving from a warning system to a control system - PHP, forum spammers - (2012-12-07)
  [3094] Setting your user_agent in PHP - telling back servers who you are - (2010-12-18)
  [2667] Web page to telephone calls / links using an iPhone - (2010-03-08)
  [2380] Object Oriented programming - a practical design example - (2009-08-27)
  [2135] What features does this visitors browser support? (PHP) - (2009-04-22)
  [1736] Current visitors from around the world - PHP - (2008-08-04)

H309 - PHP - Maps, Graphics and Geographics
  [4178] Where are you? How to write a geosensitive application - (2013-09-18)
  [3817] Fpdf - generating .pdf documents easily from your PHP program - (2012-07-24)
  [3734] QR codes with marketing logos embedded - (2012-05-16)
  [3584] QR codes - graphics images that provide quick phone links - (2012-01-18)
  [3536] UK Mapping Data - and more to come - under government Open Data measures - (2011-12-03)
  [3447] Needle in a haystack - finding the web server overload - (2011-09-18)
  [3211] Computer Graphics in PHP - World (incoming data) to Pixel (screen) conversion - (2011-03-24)
  [3197] Finding and diverting image requests from rogue domains - (2011-03-08)
  [3133] An image from a website that occasionally comes out as hyroglyphics - (2011-01-14)
  [3027] Server logs - drawing a graph of gathered data - (2010-11-03)
  [2939] Protecting your images from use out of context - (2010-08-29)
  [2729] Uploading a document or image to its own URL via a browser - (2010-04-18)
  [2675] Redirecting to your main domain for correct security keys - (2010-03-13)
  [2583] Reducing image size on digital photos - PHP - (2010-01-17)
  [2390] Dynamic / changing images on your web page - (2009-09-01)
  [2361] Geocoding - converting address to latitude / Longitude with PHP via Google - (2009-08-14)
  [1956] Images for Christmas - (2008-12-21)
  [1923] Making it all worthwhile - (2008-12-04)
  [1756] Ever had One of THOSE mornings? - (2008-08-16)
  [1752] Dynamic maps / geographics in PHP - (2008-08-13)
  [1734] All around the world? - (2008-08-03)
  [1724] addslashes v mysql_real_escape_string in PHP - (2008-07-27)
  [1628] Gant charts - drawing them with a PHP script - (2008-05-03)
  [1391] Ordnance Survey Grid Reference to Latitude / Longitude - (2007-10-14)
  [1390] Converting from postal address to latitude / longitude - (2007-10-13)
  [1389] Controlling and labelling Google maps via PHP - (2007-10-13)
  [1194] Drawing hands on a clock face - PHP - (2007-05-19)
  [1104] Drawing dynamic graphs in PHP - (2007-03-09)
  [937] Display an image from a MySQL database in a web page via PHP - (2006-11-22)
  [665] PHP Image viewing application - (2006-04-01)
  [563] Merging pictures using PHP and GD - (2006-01-13)
  [320] Ordnance Survey - using a 'Get a map' - (2005-05-22)

H401 - Some extra PHP modules
  [3454] Your PHP website - how to factor and refactor to reduce growing pains - (2011-09-24)
  [3453] Reading and using emails including enclosures on your web server. - (2011-09-23)
  [2682] Adding extensions to PHP Open Source applications - callbacks - (2010-03-17)
  [732] Where is a web site visitor browsing from - (2006-05-24)


Back to
Training Classes in other tongues
Previous and next
or
Horse's mouth home
Forward to
Reading a data file and sensing EOF in Lua
Some other Articles
Dot, dot, dot in Lua - variable length parameter lists
The indexed and hashed parts of a Lua table
Automatically initialising Lua variables the first time
Reading a data file and sensing EOF in Lua
World Flags in your PHP pages
Training Classes in other tongues
Koulutus, Open Source tietokone kielillä
ldning, Open Source dator språk
Opplæring, Open Source datamaskinen språk
Uddannelse, Open Source computer sprog
4252 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/2343_Wor ... pages.html • PAGE BUILT: Sun Mar 30 15:20:58 2014 • BUILD SYSTEM: WomanWithCat