Simple AIM profile script...
Moderator: General Moderators
Simple AIM profile script...
Ok... i have this very simple aim profile script that takes the user who is viewing another users profile and stores their screen name in a database... here is the link that gets the users screen name...
<a href="http://shoxlx.com/subpro/profile/index.php?username=%n" TARGET="_self">Click to Continue</a>
the %n gets the users screen name... i am using $_REQUEST to get the username from the link when u click on it... what happens is that when a user has a screen name with no spaces in it the script works fine, but when a user has spaces in it the script comes up with an error... if you understand what i just said please help me...
<a href="http://shoxlx.com/subpro/profile/index.php?username=%n" TARGET="_self">Click to Continue</a>
the %n gets the users screen name... i am using $_REQUEST to get the username from the link when u click on it... what happens is that when a user has a screen name with no spaces in it the script works fine, but when a user has spaces in it the script comes up with an error... if you understand what i just said please help me...
replace spaces with %20
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
i cant... see aim uses %n to retrive the users screen name... so the link would look like this...
blablabla/index.php?username=%n...
when the user opens the profile though the %n becomes whatever that users screen name is... so if the users screen name is "Shox Lx" with a space the link would look like
blablabla/index.php?username=Shox Lx
blablabla/index.php?username=%n...
when the user opens the profile though the %n becomes whatever that users screen name is... so if the users screen name is "Shox Lx" with a space the link would look like
blablabla/index.php?username=Shox Lx
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
couldnt you do something to the effect of
??
Code: Select all
$explode = explode("username=", $URLstring);
$username = array_pop($explode);
$username = str_replace(" ", "%20", $username);- elecktricity
- Forum Contributor
- Posts: 128
- Joined: Sun Sep 25, 2005 8:57 pm
- Location: Trapped in my own little world.
- Contact:
but if it's in the profile wouldnt it allready get the name? like this
<a href="http://shoxlx.com/subpro/profile/index. ... me=aoluser" TARGET="_self">Click to Continue</a>
so why not give them a link yourself when they signup or something that has the spaces as '%20'
<a href="http://shoxlx.com/subpro/profile/index. ... me=aoluser" TARGET="_self">Click to Continue</a>
so why not give them a link yourself when they signup or something that has the spaces as '%20'
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
urlencode() ??
Note: I don't think I have the foggiest idea what the problem is though (and where the %n is being used in PHP)
Note: I don't think I have the foggiest idea what the problem is though (and where the %n is being used in PHP)
in AIM profile, aim replaces any instance of %n with the viewers Screen Name.d11wtq wrote:urlencode() ??
Note: I don't think I have the foggiest idea what the problem is though (and where the %n is being used in PHP)
this way, if you have ?sn=%n, aim will replace it to something like ?sn=[VIEWER'S SCREENNAME HERE]
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA