Jump to content

Change string based on location


iheartpie

Recommended Posts

Hello all,

 

I'm after a neat script that will change a piece of copy (in strong form) dependant on the IP location of the user.

 

i.e. if the user is in the US (according to their IP) then the string might read 'blue', whereas if they're in the UK (according to their IP) then the string may read 'red'.

 

I'm only assuming that PHP will be the most appropriate for this task, correct me if I'm wrong - I'm also assuming that it will take the form of an IF statement or an array of some kind - but PHP really isn't my thing unfortunately.

 

Any help is much appreciated,

 

Thanks.

Link to comment
Share on other sites

I don't need the script to be written for me, I'd be just as happy with a point in the right direction - a tut, or even a name for the function.

 

I don't expect anyone to work for free, but lets be honest, this is a help section - most people call that consultancy and charge a bomb for it, so lets not be pedantic.

 

Thanks all the same.

Link to comment
Share on other sites

As stated, I'm not after any 'freebies' - I'm after an instructional approach as to how to achieve something - that's called help.

 

I'll go find a more helpful community, cheers anyway guys - glad I don't work with PHP, bunch of miserable bastards.

Link to comment
Share on other sites

As stated, I'm not after any 'freebies' - I'm after an instructional approach as to how to achieve something - that's called help.

 

I'll go find a more helpful community, cheers anyway guys - glad I don't work with PHP, bunch of miserable bastards.

and i helped you by pointing you in the right direction...however, peace out girl scout

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.