Page 1 of 1

AIM Screen Name Spaces

Posted: Mon Nov 03, 2003 7:27 pm
by d3ad1ysp0rk
Loading
http://www.404-design.net/aim/subprofile.php?sn=lps (in an AIM window) works; but this does not:
http://www.404-design.net/aim/subprofile.php?sn=l ps

for the reason (from what others have said) that AIM does not convert spaces into %20s in the URL, so using %n (replaces %n with their screen name) in this:
http://www.404-design.net/aim/subprofile.php?sn=%n

works, until you run into someone with a space in their name, instead of loading the subprofile, it gives you the "Error Loading Content" crap.


I tried using str_replace, but it's not seeming to work.. any ideas?

Posted: Mon Nov 03, 2003 7:40 pm
by m3mn0n
Force your friends to get a new name with an underscore instead of a space. ;)

Posted: Mon Nov 03, 2003 7:47 pm
by d3ad1ysp0rk
lol

one of my friends was like "ur subprofile still says "error loading content" ya know?"

im like "Yea, it's cuz u have spaces, get rid of them dumb@$$ ;)"

him: "why don't you do your job and FIX it?! a$$hole!" :P

Posted: Mon Nov 03, 2003 7:49 pm
by scorphus
Or take a look to [php_man]urlencode[/php_man]():

Code: Select all

<pre>
<?php
print_r($_GET);
echo '<a href="' . $_SERVER['PHP_SELF'] . '?test=' . urlencode('test test % á @#' . $_GET['test']) . '">next</a>';
?>
</pre>
One output:

Code: Select all

&lt;pre&gt;
Array
(
    &#1111;test] =&gt; test test % á @#
)
&lt;a href="/lab/get.php?test=test+test+%25+%E1+%40%23test+test+%25+%E1+%40%23"&gt;next&lt;/a&gt;&lt;/pre&gt;
Hope that works with AIM.

Cheers,
Scorphus.

Posted: Mon Nov 03, 2003 7:59 pm
by d3ad1ysp0rk
whoever clicked those links, can u please leave ur browser name or go to http://www.404-design.net/aim/test.php

cuz my if statement says:

Code: Select all

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var navName = navigator.appName;
if (navName == "Microsoft Internet Explorer" || navName == "Netscape") &#123;
   window.location = "error.php?e=browser";
&#125;
//  End -->
</script>
which includes most browsers (mozilla, netscape, ie, and a few others), but i guess it doesnt cover one of your browsers (because it still saved the screen name.. (meaning the loop didnt run..)

thanks

Posted: Mon Nov 03, 2003 8:03 pm
by scorphus
I'm using Mozilla Firebird 0.7 and the page at that link displays one word: 'Netscape'