|Encrypting URL in PHP|
Encryption of URL using PHP
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:
What I would like to do is to display only this when the user moves the cursor over the link
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.
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.
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?
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.
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.
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.oneofmydomain.com/?affid=myaffid&some_extra_parameter" title= |
"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]
Make sure you include that title attribute; otherwise the full url still shows up in Opera's status bar.