homepage Welcome to WebmasterWorld Guest from 54.227.41.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Encrypting URL in PHP
Encryption of URL using PHP
domingo




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

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




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

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




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

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




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

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




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

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




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

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




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

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




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved