Hide Hyperlinks ?
Started on the old forum in August 2007 · view the original in the archive · old links redirect here
if you have in chat or forum this: BLA BLA BLA http://HTTP://BLABLA.COM BLA BLA where the adress is hiperlink create one function like:
function formatting($txt) { $replace_this = $with_this = array();
$replace_this[] = "fuck";
$with_this[] = "***";
$replace_this[] = "bitch";
$with_this[] = "***";
$replace_this[] = ".com";
$with_this[] = "NOTHING";
$replace_this[] = "\[b\]";
$with_this[] = "**";**
$replace_this[] = "[/b]"; $with_this[] = "";
$replace_this[] = "\[i\]";
$with_this[] = "*";
$replace_this[] = "\[/i\]";
$with_this[] = "*";
$replace_this[] = "\[u\]";
$with_this[] = "";
$replace_this[] = "\[/u\]";
$with_this[] = "";
$replace_this[] = "\\[url\\]([^\\[]*)\\[/url\\]";
$with_this[] = "<a href=\"\\1\" target=\"_blank\" title=\"\\1\">\\1</a>";
$replace_this[] = "\\*)\\]([^\\[]*)\\[/url\\]";
$with_this[] = "<a href=\"\\1\" target=\"_blank\" title=\"\\1\">\\2</a>";
$replace_this[] = "\\[img\\]([^\\[]*)\\[/img\\]";
$with_this[] = "<img src=\"\\1\" alt=\"\\1\" title=\"\\1\">";
$replace_this[] = "\\*)\\]([^\\[]*)\\[/img\\]";
$with_this[] = "<img src=\"\\1\" alt=\"\\2\" title=\"\\2\">";
foreach($replace_this as $nume => $valoare) {
$txt = eregi_replace($valoare, $with_this[$nume], $txt);
}
$txt = nl2br($txt);
return $txt;
}
edit this funtion and add more words the include in your script :
if your chat line or forum line is ike this: echo "*".formatting($row['LINE CHAT'])." .....
this solve your problem?
shit, i dont understand.
- you want show links or not?
- you want to show only for NOKIA OR PC?
- you want to hide for normal phones?
you write this: Hi Can anyone provide the code to hide hyperlinks
explain again. yes/no
shit, i dont understand.
- you want show links or not?
- you want to show only for NOKIA OR PC?
- you want to hide for normal phones?
you write this: Hi Can anyone provide the code to hide hyperlinks
explain again. yes/no
m want
want to hide for normal phones? not show links any type browser
mayb he is tryn to say that he dont want spamming on his site???? im not sure hehehe
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
sa ma fut, nu te inteleg / i dont understand External image (may be gone)
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
... He would like to obscure the true path. ie. If you hold your cursur over the link it will show eg. http://link.php?link=132 instead of http://blah.blah/path/path/blah.php.
Ok what are you trying to hide? and for what reason as there are different ways of doing this?
maybe you want to rewrite the links...that its the idea?
visit : http://web-programming.suite101.com/articl...ng_via_htaccess
... He would like to obscure the true path. ie. If you hold your cursur over the link it will show eg. http://link.php?link=132 instead of http://blah.blah/path/path/blah.php.
Ok what are you trying to hide? and for what reason as there are different ways of doing this?
yes if any one over the cursur link show
m want shield for my sites liks without registration
but any one download from direct in my site not from other site in which add my links
i think its a session made downloads
Ah ok u would like to hide hyperlinks for users that are not logged in (if i understood that right lol)
Yes it will be session based then. Then you can simply define a function to check if the user is logged to return a true or false statement and use something like the following to print different links for the logged user and the guest.
if (islogged($session))
{
print"
<a href=\"/path1/index.php\">path1</a>
<a href=\"/path2/index.php\">path2</a>
<a href=\"/path3/index.php\">path3</a>
";
}else{
print"
<a href=\"register.php\">path1</a>
<a href=\"register.php\">path2</a>
<a href=\"register.php\">path3</a>
";
}
This will direct all logged users to the correct path and direct all unlogged users to the set page (i put register page)
Hope that helps lol hiding the true path to downloads is complicated, but obscuring path for unregistered users is that easy External image (may be gone)