TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-01-2008, 10:26 PM   #1 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default Image links!

Hey!

I'm wondering how I can have a image linking to a site.
But when they hover the image, the link can't be shown in the little field down to the left.. Is that possible?

Maybe not with html, but with js? or something else... ?

Thanks in advance!
Tanax is offline  
Reply With Quote
Old 02-01-2008, 10:31 PM   #2 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Why would you want to do that? Trying to hide something?
__________________
Eric
wGEric is offline  
Reply With Quote
Old 02-01-2008, 10:42 PM   #3 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

I'm sure it can be done in Javascript but I've no idea how, I'm sure someone has though.

I have done a similar system in PHP before though, we had a simple database:

Code:
1:citalan.blogspot.com
2:www.talkphp.com
Then a simple PHP script that took a link such as:

Code:
http://www.mysite.com/go.php?link=2
Our go.php script then looked up $_GET['link'] in the little database and used header() to redirect to the requested site.

Alan
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
The Following User Says Thank You to Alan @ CIT For This Useful Post:
Tanax (02-01-2008)
Old 02-01-2008, 10:55 PM   #4 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Quote:
Originally Posted by wGEric View Post
Why would you want to do that? Trying to hide something?
Erh, yes.. any problems?

Quote:
Originally Posted by Alan @ CIT View Post
I'm sure it can be done in Javascript but I've no idea how, I'm sure someone has though.

I have done a similar system in PHP before though, we had a simple database:

Code:
1:citalan.blogspot.com
2:www.talkphp.com
Then a simple PHP script that took a link such as:

Code:
http://www.mysite.com/go.php?link=2
Our go.php script then looked up $_GET['link'] in the little database and used header() to redirect to the requested site.

Alan
Yea I thought of that too, but I just hoped there was an easier way xDD
Thanks
Tanax is offline  
Reply With Quote
Old 02-01-2008, 11:12 PM   #5 (permalink)
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

Perhaps you're referring to the status bar?

Code:
<a href="http://some.site.com/" onmouseover="window.status='';">text</a>
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote
The Following User Says Thank You to xenon For This Useful Post:
Tanax (02-02-2008)
Old 02-02-2008, 10:22 AM   #6 (permalink)
The Contributor
 
DeMo's Avatar
 
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
DeMo is on a distinguished road
Default

It's a lot easier (and takes less resources) if you do it with JavaScript. But be aware that the user MUST have JavaScript enabled in his browser and he can also see the real link if he looks at the source-code of the page.
Send a message via ICQ to DeMo Send a message via MSN to DeMo Send a message via Skype™ to DeMo
DeMo is offline  
Reply With Quote
The Following User Says Thank You to DeMo For This Useful Post:
Tanax (02-02-2008)
Old 02-02-2008, 11:16 AM   #7 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Is it possible to check if he's got JS enabled with php??

So like..
PHP Code:
if(javascriptcheck == enabled) {
echo 
'<a href="http://some.site.com/" onmouseover="window.status='';">text</a>';
}
else {
echo 
'<a href="redirect.php?id=somesite">text</a>';

???
Tanax is offline  
Reply With Quote
Old 02-02-2008, 02:11 PM   #8 (permalink)
The Acquainted
 
EyeDentify's Avatar
 
Join Date: Nov 2007
Location: Sweden
Posts: 106
Thanks: 13
EyeDentify is on a distinguished road
Default

Tanax what would be the point of using javascript to hide the URL in the statusbar if a user could just view the sourcecode ?
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
EyeDentify is offline  
Reply With Quote
Old 02-02-2008, 03:33 PM   #9 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Quote:
Originally Posted by EyeDentify View Post
Tanax what would be the point of using javascript to hide the URL in the statusbar if a user could just view the sourcecode ?
I guess a php redirector would be the ultimate thing, huh?
Tanax is offline  
Reply With Quote
Old 02-02-2008, 04:36 PM   #10 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

lol..........
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 02-02-2008, 05:17 PM   #11 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Quote:
Originally Posted by Orc View Post
lol..........
What????????
Tanax is offline  
Reply With Quote
Old 02-04-2008, 07:30 PM   #12 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
Erh, yes.. any problems?
I'd highly recommend not doing that. Lots of people look at that to see what the link is to see if it contains XSS or anything suspicious. If I mouse over a link and get nothing then that raises a red flag.

Hiding the link made me think you were trying to hide an XSS attack. That's why I asked my cryptic question.

To check javascript you can do something like this
Code:
<script type="text/javascript">
<!--
document.write('<a href="mylink">link</a>');
//-->
</script>
<noscript>
<a href="page.php?redir=mylink">link</a>
</noscript>
The first link is written to the screen only if JS is enabled. The second gets written if there is no javascript.
__________________
Eric
wGEric is offline  
Reply With Quote
The Following User Says Thank You to wGEric For This Useful Post:
Tanax (02-08-2008)
Old 02-07-2008, 08:07 PM   #13 (permalink)
The Contributor
 
Join Date: Apr 2005
Location: Kent, UK
Posts: 54
Thanks: 0
Dr John is on a distinguished road
Default

I NEVER click on a link that doesn't show where I'll end up in the status bar!
Most users with half a brain will think "what's he trying to hide??? Let's go elsewhere."
__________________
www.kidneydialysis.org.uk
Dr John is offline  
Reply With Quote
Old 02-08-2008, 08:36 AM   #14 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Yea well.. I have my reasons

Thanks eric
__________________
Tanax is offline  
Reply With Quote
Old 02-08-2008, 10:21 AM   #15 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

There are various tools available as well Tanax. I suggest having a look at the Mad4Milk website or MooTools. :) AJAX Javascript Engine.
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 02-13-2008, 10:22 PM   #16 (permalink)
The Contributor
 
Join Date: Apr 2005
Location: Kent, UK
Posts: 54
Thanks: 0
Dr John is on a distinguished road
Default

Hide where they are going, and you will loose your users, it's as simple as that.
People will be so suspicious about what you are up to, they are not going to stay on your site.
__________________
www.kidneydialysis.org.uk
Dr John is offline  
Reply With Quote
Old 02-27-2008, 02:06 AM   #17 (permalink)
Dan
The Wanderer
 
Dan's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 15
Thanks: 6
Dan is on a distinguished road
Default

Why don't you link to a page like deviantART: where ART meets application! - where it redirects to another page? It is the best way of hiding a URL from the status bar.
Dan is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 06:18 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design