need some help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anfx
Forum Newbie
Posts: 1
Joined: Mon Jun 30, 2003 9:27 pm

need some help

Post by anfx »

Hello,

I have a short domain name that I would like to use for all of my linking.

Let's say the domain is dom.com and I want dom.com/link2 to be able to access my sql database pull up the 'link2' link, which let's say is somebigdomain.com/link.php and then automatically redirect me to that url.

Does anybody know on how I can accomplish this?

Thanks,

Andy
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

i know there is a php function for it, but i don't know that.

here's some htmkl for the link page to call to then fwd to the page at the big domain (note, needs to be in the <hea></head> tags)

<meta http-equiv="refresh" content="0;url=http://www.somebigdomain.com/actualpage.php">
Tubbietoeter
Forum Contributor
Posts: 149
Joined: Fri Mar 14, 2003 2:41 am
Location: Germany

Post by Tubbietoeter »

first youll need a database with the links in it, and then you implement a php site that takes a given variable, and pulls the link for the given variable out of the database.

you call your php site with http://www.thisistheurl.com/get_link.php?linkid=1

or

you call your php site with http://www.thisistheurl.com/get_link.php?linkid=5

or

....

the php script "get_link.php" must take the content of the variable $_GET['linkid'] and search for it in the db.

"select link from linktable where linkid = ".$linkid

then you either include the link or you reference it lile m3rajk told you to
Post Reply