Using Hidden Links

They have: 1 posts

Joined: May 2009

Hello, newbie here so please forgive me if this is in the wrong place.

I have someone that is sort of trying to intimidate my website and me personally, it's a long story that includes some weirdo stalker I've attracted.

Somehow my site tracker is showing referrals from people looking for porn related stuff, my site is not porn related.

The referrals seem to be coming from an image sometimes, sometimes a link (sorry to be vague but it's an odd situation) I can get up to 80 hits a day from these referrals. I've looked at the source of this persons page and links (it's coming from a page on his personal website) and nothing shows, I've contacted his hosts who aren't at all bothered that this weirdo is using them to harass me, it sounds paranoid but it isn't he has even been warned by my local police force to stop the harassment, this shows how obsessed he is as he has carried on.

What I'm asking is is there a way to disguise/hide a link or script or code to divert people looking for certain types of websites to others as I just want to get this idiot off my back, if I can find out how it is being done then I can go back to his hosts and inform them what he is doing as they either don't want to know or can't be bothered.

Thanks

He has: 131 posts

Joined: Jun 2008

Hello me-c and welcome to the forums! Smiling

If you don't see anything in his pages' source file than it could be coming from a php script(or other server side script) or from a .htaccess file on his server.

If you don't want his referred links to show your site you could use php code similar to this.

<?php
$referred_from
= $_SERVER[ 'HTTP_REFERER'];

$blocked_sites = array("site1", "site2", "site3", "and so on");

if(
in_array($referred_from, $blocked_sites))
{
     echo
"You can not view my site, sorry";
}
else
{

//code for showing the page on the site

}
?>

Now I will go over the code for you.
The first part

<?php
$referred_from = $_SERVER[ 'HTTP_REFERER'];

The first line signals the start of the php code to be executed. The second line gets the referral link from your web server

The second part

$blocked_sites = array("site1", "site2", "site3", "and so on");

This line is where you will put all of the sites you would like to deny access to your site from. The array function will create an array with the values that you put in. The current array would contain the values site1, site2, site3, and "and so on" all in the same array.

The third part

if(in_array($referred_from, $blocked_sites))
{
echo "You can not view my site, sorry.";
}

This part checks to see if the referral url is in the array of blocked sites. If it is in the list the person on the other end will get the message "You can not view my site, sorry."

The fourth and final part

else
{

//code for showing the page on the site

}
?>

This sends the user who hasn't been redirected from a blocked site to your site. add your own site's code between the { and } or echo a redirect in html. The ?> at the end will end the code and the php script.

If you don't know anything about php you can learn from here.
I hope this helps with your problem.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.