Neskaya Forum Community Neskaya Chat Neskaya staff
Home

Tutorials

Articles (6)
HTML/CSS (15)
Javascript (3)
PHP (3)
Paint Shop Pro 7 (7)
Flash CS3 (9)

Design

Avatars (166)
Layouts (8)
phpBB3 Skins (4)
Buttons (20)
Fonts
Emoticons
Adopt

Quizzes

Classical Elements
Your Baby's Looks
Clothes Color
More (10)

Interactive

Button Rotation
Hosting
Livejournal

PHP Tutorial: Link Redirecting [from a single page]

I had a really hard time finding out how to do this when I wanted to learn, so I'll put a tutorial up for anyone else who was wondering. Have you ever wondered how people have links that look like yoursite.com/exit.php?id=1 and it redirects to a different site? It's really useful if you want all of your affiliates to have only one link from your site as the referral URL, for example. This is how you do it.

Put the following code into a text file and save the file as exit.php (or whatever other name you want to use for the links):

Where it has a number (1, 2, 3), that is your ID. So yoursite.com/exit.php?id=1 would redirect to neskaya.net, see? You can change the ID to include multiple numbers or letters if you wish.

Feel free to add more links, but remember - all of the links must be followed by a comma except for the last one.

In the if statement, you see the world 'id' twice. You can change that word if you wish. For example, if you change it to 'link' then you would be redirected to neskaya.net from yoursite.com/exit.php?link=1.

Save and upload exit.php (or your file name) onto your server. That's all there is to it!



Forum

Latest Topics...
- Continuing Story OOC
- Hai Hai Everyone :3
- WE SHALL TALK ABOUT MUFFINS!
- Harle is a bastard
- messages of love



Site

Submissions
Terms of Use
Credits
Links & More


Site of the Month



Affiliates

None


 
Neskaya.Net is © Strawbee 2008. All rights reserved.
Best viewed in 1024 x 768 resolution or higher.


eXTReMe Tracker