Hide Hyperlinks ?

Started on the old forum in August 2007 · view the original in the archive · old links redirect here

15 replies · 1,211 views · started 19 years ago · 1 min read

3 participants
Guest #1

Hi Can anyone provide the code to hide hyperlinks

amylee Principal · 1,092 posts #2

more info please

blackhowk Senior · 411 posts #3

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?

Guest #4

Sir M Want In My Site Show Any Type Link Not Show If Any One Find It From Nokia Browsers Or In Pc On Cursure. .

blackhowk Senior · 411 posts #5

shit, i dont understand.

  1. you want show links or not?
  2. you want to show only for NOKIA OR PC?
  3. you want to hide for normal phones?

you write this: Hi Can anyone provide the code to hide hyperlinks

explain again. yes/no

External image (may be gone)

Guest #6

shit, i dont understand.

  1. you want show links or not?
  2. you want to show only for NOKIA OR PC?
  3. you want to hide for normal phones?

you write this: Hi Can anyone provide the code to hide hyperlinks

explain again. yes/no

External image (may be gone)

m want

want to hide for normal phones? not show links any type browser

Guest #10

m want any one not a copy my site links direct in other sites. m want session made downloads. can any one help me for it...

Guest #13

... 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

amylee Principal · 1,092 posts #15

whats the point?

hellspawn #16

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)

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close