...

View Full Version : URL Encode problem.



bubbles19518
11-03-2006, 12:31 AM
Okay, I have a script that checks weather or not an AIM screenname is online. Today I realized that you can have spaces in your AIM screename... So I urlencoded "my screename" to become "my+screename" only problem is when I feed the username into this link:

aim:goim?screenname=my+screename&message=Hey

and IM box comes up for "my", not the whole screenname, any clue how I can fix this?

rafiki
11-03-2006, 12:37 AM
show your code dude

bubbles19518
11-03-2006, 12:45 AM
<?
//not needed for JS
$username = $_GET['u'];
if(!empty($username))
{
?>
<script language="JavaScript">
document.location="aim:goim?screenname=<?=$username?>&message=Hey";
</script>
<a href="aim:goim?screename=<?=$username?>&message=Hey">Click Here to IM <?=$username?></a>
<?
}
if(empty($username))
{
echo("No AIM username specified.");
}
?>


So if $username = "screen+name", an IM box shows up for "screen".

rafiki
11-03-2006, 12:48 AM
if u post al ur code for 2 pages i will test on server

bubbles19518
11-03-2006, 12:50 AM
<a href="http://myspace-source.com/aimclick.php?u=screen+name" target="_BLANK">
<img src="http://myspace-source.com/aimonline.php/screen+name.gif" border="0"></a>


Would be a sample button you might see on a page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum