Welcome to WebmasterWorld Guest from 54.226.189.112

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Encrypting URL in PHP

Encryption of URL using PHP

     

domingo

9:56 am on Aug 4, 2002 (gmt 0)

10+ Year Member



Hi,

I will be grateful, if anyone can help me with this:

I need to encrypt a URL, currently if a user moves the cursor over a link, the URL is diaplayed as follows:

[oneofmydomain.com...]

What I would like to do is to display only this when the user moves the cursor over the link

[oneofmydomain.com...]

However, at the same time, I would like to passon the extra parameters when the user clicks the links

I tried PHP encryption function, but couldnt do it.

Regards,

toadhall

4:20 pm on Aug 4, 2002 (gmt 0)

10+ Year Member



The simplest way to do this is to use "title=" in the link:

<a href="http://www.oneofmydomain.com/?affid=myaffid&some_extra_parameter" title="http://www.oneofmydomain.com">Link</a>

...though not sure how far back browser support for "title" goes.

domingo

4:54 pm on Aug 4, 2002 (gmt 0)

10+ Year Member



Although this method is showing my desired URL in a small yellow box when the cursor is over the link, but its still showing the long URL with all the affiliate id and other stuff on the bottom bar, which is the IE status bar.

Any other tips?

toadhall

8:41 pm on Aug 4, 2002 (gmt 0)

10+ Year Member



The only other thing I can think of is to use a form with the post method (to get rid of the appendages), using an image for the button(s) imitating your text. An onclick event handler or separate forms for each "link".

There is another method but the possible impact on the web is rather dark as it hides everything. Why, the theological implications alone are staggering. But here it is:

php can read co-ordinates from images, much like image mappery, so it's possible to set up an image as a button in a form and read the clicked on co-ordinates with the php script in the action attribute. A series of conditionals or a switch statement would then send your visitors flying. And nothing, I said nothing, shows up in the status bar, or anywhere else for that matter, except the original url; presumably your site's index page. No need to include the file.name in the url or action attribute, so it would be [oneofmydomain.com...] forever and always. As there're no href links, there're no link references. And View > Source shows only a small form with an innocuous image reference.

Evil enough for you?

I really hesitate mentioning this as the effect on SE indexing, if used as primary navigation, would be akin to lights out.

Dreamquick

8:54 pm on Aug 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No-one has suggested this yet - use of the onMouseOver event.

This simply changes the status bar text whenever someone hovers the mouse pointer over a certain link, also this example clears the status bar as the mouse leaves the link.

There are ways around it but it will fool most people unless they are using a text-only browser, browsing with javascript turned off or actively looking for a disguised link.

e.g. lets say you have the following url...

<a href="http://www.example.com/?blah=foo">click me!</a>

...but wanted to make it appear like it was pointing at the root, you could try something like this; (line breaks aren't necessary but make the example easier to read)...

<a href="http://www.example.com/?blah=foo"
onMouseOver="window.status='http://www.example.com/';return(true);"
onMouseOut="window.status='';return(true);">click me!</a>

- Tony

Key_Master

8:54 pm on Aug 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try:

<a href="http://www.oneofmydomain.com/?affid=myaffid&some_extra_parameter" title=
"http://www.oneofmydomain.com" onMouseOver=
"window.status='http://www.oneofmydomain.com'; return true">Link</a>

<added>oops, Dreamquick beat me to it<added>

[edited by: Key_Master at 8:56 pm (utc) on Aug. 4, 2002]

olwen

8:55 pm on Aug 4, 2002 (gmt 0)

10+ Year Member



I have been considering using javascript for a similar thing. Make a sraight link to [oneofmydomain.com...] but an onclick action to link to
[oneofmydomain.com...]
If people have javascript turned off they will use the straight link, but the number who do might not be enough to matter.

toadhall

7:22 pm on Aug 5, 2002 (gmt 0)

10+ Year Member



Make sure you include that title attribute; otherwise the full url still shows up in Opera's status bar.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month