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 &... Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/ 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. Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-416482 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? Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-416509 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 ; Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-416511 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. Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-416513 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? Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-416514 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. Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-416516 Share on other sites More sharing options...
darklight Posted December 19, 2007 Author Share Posted December 19, 2007 ok, thanks for the replies! Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-418061 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 ";" Link to comment https://forums.phpfreaks.com/topic/81964-anything-else-besides/#findComment-418076 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.