Sponsored Content
Top Forums Web Development HTML/PHP show IMG based on location Post 302602086 by lawstudent on Sunday 26th of February 2012 01:13:49 AM
Old 02-26-2012
HTML/PHP show IMG based on location

HI guys/gals,

I like to add some personal touches to a welcome image on our mediawiki site, and have the welcome be displayed in the, presumed, language of the visitor.

Standard would be English, but if the IP or browser or OS is set to be in India, I want to display the message in Urdu for example... Or if South Afrika than I want the SA Afrikaans image to show.

Anyone have some idea on how to accomplish this using simple code?
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copying files from one location to another based on a list

I have a text list of about 3,000 file names (image files), which exist on a server and that I want to copy over to another location. I understand the Unix cp code, but what's the string to have it copy multiple files based on an external list? Many thanks! (4 Replies)
Discussion started by: rebornhonest
4 Replies

2. Shell Programming and Scripting

how to detect ip address based location using PHP

I am interested in finding out if there is a reliable and economical way for extracting user's location based on his ip address, using php I tried to get the job done using ip2location.com, but I am not happy how it deals with result inconsistently. (2 Replies)
Discussion started by: siftin-com
2 Replies

3. OS X (Apple)

Location Based Printing in Leopard not working

Hello all, I've been searching for an answer but coming up with nothing so I figured I'd give it a shot and ask. After installing a fresh version of Leopard (with the latest updates) on a computer and then copying the user data back onto said computer, the location based printing doesn't work... (0 Replies)
Discussion started by: erodrigue
0 Replies

4. Web Development

PHP client location based page loading

Hi, I am new to PHP and at first got a task where I need some clues and help. So I am here.. The server is build to provide customized access for modules as per location. If client location is US then it shows modules and pages specific to US and if location is UK then it shows UK specific... (1 Reply)
Discussion started by: zing_foru
1 Replies

5. Shell Programming and Scripting

Parse based on location

I do have a big text file >A1 ACFGTSDCHG_GDF DGHA >A2 A_FGGSD_HG_GSF DGTA >A3 AC_GSDD_TU_GDF DGH_ .. ... there are equal number of characters within all the sub-headers. I want to parse out all the characters under each sub-header from user specified locations. For example, I want... (5 Replies)
Discussion started by: Lucky Ali
5 Replies

6. Shell Programming and Scripting

How to copy files from one location to another based on a priority?

Hi Gurus, I am a newbie to shell scripting and I am facing a problem right now.I have to automate the copy of files based on a priority.The scenario is as below: 1) There will be files from Mon-Fri with Mon file being named as abc_def_01_YYYYMMDD and Tue file being abc_def_02_YYYYMMDD and so... (4 Replies)
Discussion started by: vikramgk9
4 Replies

7. Shell Programming and Scripting

Show Logs from a server location to a web browser

hey Guys, Am a newbie to Linux and have a probable requirement that might come up pretty soon. I need to understand, how log files and log location can be displayed on a web browser. So that the end user can read the log files and should be able to search for order numbers in the logs. If... (2 Replies)
Discussion started by: ashish_samarth
2 Replies

8. Shell Programming and Scripting

Apache configuration Automation based on location

Hi I need to find a way to automate the deployment of my apache configuration to a few servers. I make change frequently on apache/conf/... etc, and I usually do this manually by copying files to each servers(and country config path)and restart apache servers.Source file will be like... (1 Reply)
Discussion started by: naresh2389
1 Replies
WEB2PNG(1)							     Graphics								WEB2PNG(1)

NAME
web2png - convert a web tree from using GIFs to using PNGs SYNOPSIS
web2png [-adnrtv] [directory...] DESCRIPTION
Web2png is a front end for gif2png(1) that automatically converts entire web page hierarchies from using GIFs to using PNGs. It does image conversion and patches IMG SRC references in web pages. The arguments to web2png must be directories; if none are given, the current directory is assumed. In each directory, web2png tries to convert every GIF to a PNG. It leaves alone GIFs that have multiple images, because these will not display properly in all current browsers. It also does not reconvert GIFs that already have corresponding PNGs (e.g. the same name except for the .gif file extension). The original GIFs are left in place. Web2png tracks successful conversions. It then looks at each HTML, secure HTML, HTML inclusion, PHP page, JavaScript program or Cascading Style Sheet under the argument directories (extensions html, shtml, .inc, .php, .js, .css). In these pages, it fixes each reference to each successful converted GIF to point at the PNG. References in relative HREF and BACKGROUND tags are recognized by filename and fixed (any base directory declared by a BASE tag will be be prepended to the relative URL). References that are HTTP URLs are matched against the list of convertible GIFs by basename; if there is such a match, the contents of the URL is retrieved and compared to the convertible GIF. If both basename and data match, the HTTP reference is fixed. If the pages are under RCS version control, they're checked out for modification before being altered; otherwise, a copy of the original of each modified web page is left in the same directory, with the additional extension .bak. The following options change the behavior of the program: -a Convert all GIF files, including those with multiple images. -d Delete originals. Removes all GIFs with corresponding PNGs, and all .bak files. -n Make no changes. With this option, web2png reports on what needs to be done (and on GIFs that have multiple images), but neither converts GIFs nor touches web pages. -r Reverse. Restore all HTML/SHTML/PHP pages from the .bak files created by a previous run (or, if the files were under version control, revert them). Remove PNGs with corresponding GIFs. -v Verbose. Utter more trace information about the conversion process. Web2png can be run on a directory that has already been partly converted by previous runs; it will do the minimum necessary amount of work. The changes it makes will be fully reversible with -r until you run it in -d mode. Web2png is written in Python. Python 1.5.2 or better must be installed and accessible on your system in order for web2png to run. NOTE
Sometimes it's possible to convert transparent GIFs without altering the appearance of the page, by knowing from context that they will always place within an area of fixed and solid color. Web2png can't deduce when this will be, so it doesn't try; but it may be useful to apply gif2png with the -b option by hand. KNOWN PROBLEMS
The algorithm for fixing HTTP URLs is not foolproof. It could be confused into incorrectly patching an HTTP URL reference to a GIF into an invalid reference to a PNG if the GIF matches a local target GIF by both basename and binary content, but actually lives on another host. This program does not automatically convert CGIs; you'll have to do that by hand. Other dynamic-content methods (such as server-side inclusions) may also require hand-hacking. The program cannot tell converted from preexisting PNGs; if you have PNGs with the same stem name as corresponding GIFs but carrying different information, the -r mode will clobber them. SEE ALSO
gif2png(1) AUTHORS
Eric S. Raymond <esr@thyrsus.com>, October 1999. Slightly modified for Debian by Aaron Isotton <aaron@isotton.com>. web2png 03/08/2012 WEB2PNG(1)
All times are GMT -4. The time now is 05:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy