View Full Version : Subprofile Question--Changing the URL?


XxBeaNxX
07-14-2003, 07:00 PM
if any of you have heard of a feature called subprofile, i have a related question. i am trying to host my own "subprofile" due to the problems with subprofile.com's subprofiles. if you dont know wut subprofile is, it is a service that makes a text-only webpage with php features such as counters, guestbooks, countdowns, polls, quizzes, etc. so that you can put a link to it in your aim profile.

in aim there is a feature to get the person-who-is-viewing-ur profile's screenname by using the text "%n". if the screenname of the person-who-is-viewing-ur profile has spaces in it %n will display them.

so the problem is that when i put the link in my profile using %n in the url (i.e. http://urlhere.com/index.php?sn=%n) to get the persons screenname for future reference if the "subprofile", it doesnt work properly for people with spaces in there screennames. lets say the screenname is john doe123, the url would be something like http://urlhere.com/index.php?sn=john doe123. the problem is that anything after the first space in the url will not be read by aim. instead when you call the "sn" from the url with a variable, it will only read john, instead of johndoe123. what i would like to happen is that when john doe123 (or any other person with a space in their screenname) clicks the link in my aim profile, the page refreshes so that the url has NO spaces.

i hope that made sense

Ökii
07-14-2003, 08:10 PM
assuming you cannot affect the page code of the aim space (and what are you doing using aol ? yikes - dont' like the ads? go elsewhere. Complain publicly one more time? Don't think you're ever coming back still aol though) you will be left with trying to port variables from the $_REQUEST or $_GET arrays.

run an echo $_SERVER['QUERY_STRING'] in your receiving page and see if you get the entire query set -
if you do then I would surmise that a simple
urldecode($_SERVER['QUERY_STRING']); would do the trick - would assign space for %20 etc etc

if you get no good response from the top echo AND you can run code on the parsed page on the aim thing (btw, what you doing using aol? did I mention that?) then
urldecode(....the compiled url...)

basically if aim isn't passing the var=val pairs correctly, there is nowt you can do.