how to make luk outbound link as inbound link

General discussions related to php

Moderators: macek, egami, gesf

harpreet
New php-forum User
New php-forum User
Posts: 1
Joined: Wed Jun 06, 2012 8:53 pm

how to make luk outbound link as inbound link

Postby harpreet » Wed Jun 06, 2012 10:03 pm

hello everybody I wana place outbound link my site lets say http://www.yourdomain.com on any link
but i want when someone place mouse over link it should display links as http://mydomain.com/value="http://www.yourdomain.com" and it should redirect to yourdomain .com
i dont know how to do so
please help me out as soon as possible

User avatar
ejsexton82
New php-forum User
New php-forum User
Posts: 86
Joined: Mon Jun 04, 2012 10:05 pm
Location: Ankara, Turkey
Contact:

Re: how to make luk outbound link as inbound link

Postby ejsexton82 » Sat Jun 09, 2012 10:09 pm

If your URL was something like this:

  • http://mydomain.com/index.php?value=http://www.yourdomain.com

Then the following code should redirect to the other site:

Code: Select all

if(!empty($_GET['value'])) {
   header("Location: {$_GET['value']}");
   exit;
}


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron