Jump to content

Recommended Posts

Greetings.
I've just started to learn PHP and I need some help with a script, what I'm looking for is a script that will display an image if accessed by a specific IP address and an alternate image if accessed by any other IP. If any one could assist me in locating or writting a script that would preform those actions it would be greatly appreciated. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
Thanks in advance,
Impius
Link to comment
https://forums.phpfreaks.com/topic/12567-newbie-needs-script-help/
Share on other sites

If your just learning then maybe this would be a good place to start. You will find a users ip in the $_SERVER array. Look it up [a href=\"http://php.net/globals\" target=\"_blank\"]here[/a]. Then you'll need to use an if() conditional. Look them up [a href=\"http://php.net/if\" target=\"_blank\"]here[/a].
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.