darklight Posted December 17, 2007 Share Posted December 17, 2007 is their anything besides the &? I'm trying to do ?username&type=. But the game engine's TCP object don't support &... Quote Link to comment Share on other sites More sharing options...
corbin Posted December 17, 2007 Share Posted December 17, 2007 Wow what a vague, vague question.... Anyway, you could always make PHP explode and use the $_SERVER['QUERY_STRING']. For example: if the following page was named test.php and you went to http://yoursite.com/test.php/corbin/type1/.... $q = $_SERVER['QUERY_STRING']; $e = explode('/', $q); if(count($e) < 2) { echo "All of the information wasn't supplied."; } else { echo "The name is {$e[0]} and the type is {$e[1]}."; } That would say, The name is corbin and the type is type1. Quote Link to comment Share on other sites More sharing options...
btherl Posted December 17, 2007 Share Posted December 17, 2007 I have an answer and a question.. The answer is that ";" can sometimes be used instead of "&" The question is: TCP is at a lower level to HTTP, and deal with connections between hosts. HTTP is the level at which "&" is used. I would not expect a TCP object to deal with "&", which is an HTTP thing. Are you using the right object? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 17, 2007 Share Posted December 17, 2007 The delimienation of $_GET variables is not handled at your TCP Level but the directory level via the config file .htaccess The delimenation can be altered as it is in this forum to ; Quote Link to comment Share on other sites More sharing options...
corbin Posted December 17, 2007 Share Posted December 17, 2007 Actually, cooldude, the parsing of the $_GET array is handled by PHP, not Apache. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 17, 2007 Share Posted December 17, 2007 Well the phrasing of it, but I believe, and tell me if I'm wrong, .htaccess will all you to alter it, which changes how apache sets it up to give to php? Quote Link to comment Share on other sites More sharing options...
corbin Posted December 17, 2007 Share Posted December 17, 2007 Do you mean something like using mod_rewrite to change something like http://somesite.com/thepage.php/5/ to http://somesite.com/thepage.php?id=5 behind the scenes? In that case, the URL given to PHP is still http://somesite.com/thepage.php?id=5. Quote Link to comment Share on other sites More sharing options...
darklight Posted December 19, 2007 Author Share Posted December 19, 2007 ok, thanks for the replies! Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 19, 2007 Share Posted December 19, 2007 You can almost use anything really, just make sure you break down the url String the right way, and use an explode function to get the data. This forum uses ";" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.