Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Location
    Colorado
    Posts
    132
    Thanks
    7
    Thanked 1 Time in 1 Post

    URL Encode problem.

    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?
    -bubbles

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    show your code dude

  • #3
    Regular Coder
    Join Date
    Sep 2006
    Location
    Colorado
    Posts
    132
    Thanks
    7
    Thanked 1 Time in 1 Post
    PHP Code:
    <?
    //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".
    -bubbles

  • #4
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    if u post al ur code for 2 pages i will test on server

  • #5
    Regular Coder
    Join Date
    Sep 2006
    Location
    Colorado
    Posts
    132
    Thanks
    7
    Thanked 1 Time in 1 Post
    Code:
    <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.
    Last edited by bubbles19518; 11-03-2006 at 03:43 PM.
    -bubbles


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •