Mountain Water Posted December 29, 2009 Share Posted December 29, 2009 I want to use, $_GET['@']; Or maybe even $_GET['!']; I tryed these and they work fine, they look sexy the browser and unique. Is it legal to use? Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/ Share on other sites More sharing options...
oni-kun Posted December 29, 2009 Share Posted December 29, 2009 I want to use, $_GET['@']; Or maybe even $_GET['!']; I tryed these and they work fine, they look sexy the browser and unique. Is it legal to use? Generally, anything other than '?' and '&' are valid, but there's a chance somewhere you'll run into problems using them.. Such as when entering that into a query directly, it'd break the string. Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985218 Share on other sites More sharing options...
Mountain Water Posted December 29, 2009 Author Share Posted December 29, 2009 I want to use, $_GET['@']; Or maybe even $_GET['!']; I tryed these and they work fine, they look sexy the browser and unique. Is it legal to use? Generally, anything other than '?' and '&' are valid, but there's a chance somewhere you'll run into problems using them.. Such as when entering that into a query directly, it'd break the string. ISn't that why u just define them as a different variable? Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985219 Share on other sites More sharing options...
premiso Posted December 29, 2009 Share Posted December 29, 2009 It is legal, well it seems to work with FireFox. As for using them I would suggest against it as most web searches will look down on it. If you do not care about that I would test it in Opera / IE 7-8 / Safari and make sure it does not cause them any dismay. But why use them? Readable names are much more preferred in my opinion. EDIT: If you are going to define them as a different variable, why not just use that variable name? Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985221 Share on other sites More sharing options...
oni-kun Posted December 29, 2009 Share Posted December 29, 2009 Yes, most bots parse the url and strip out useless characters, it may confuse search engines for example. It's really a pointless thing to add, I've already been there and it just didn't matter what it was. site.com?foo=bar&%=baz&!=john Messy, IMO. Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985223 Share on other sites More sharing options...
Mountain Water Posted December 29, 2009 Author Share Posted December 29, 2009 Like $_GET['$']; works just fine and on my url on my software my board is layouted like this index.php?$=Forums, $=Topic, $=etc.. Will it be fine, what if google index's and takes out the $'s then im screwed? Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985224 Share on other sites More sharing options...
premiso Posted December 29, 2009 Share Posted December 29, 2009 I know google will not like that. But if you want to be indexed and SEO friendly why not add another keyword to be searched? In all honesty, there is no benefit to using a special character for the GET data. There are only cons, so you might as well fix it. Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985227 Share on other sites More sharing options...
oni-kun Posted December 29, 2009 Share Posted December 29, 2009 Yes. And google DOES have the power to recognize 'u=202&t=3' and add SEO towards that. Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985229 Share on other sites More sharing options...
Mountain Water Posted December 29, 2009 Author Share Posted December 29, 2009 Ya'll being to hard on me i was just asking a question. I'll just use $_GET['a']; instead of $_GET['act']; cause i want small url, Thanks! Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985231 Share on other sites More sharing options...
ignace Posted December 29, 2009 Share Posted December 29, 2009 They are being hard because they care. Anyone else would just say: "Yeah sure it's valid. Carry on!" Until you later find out your Google PageRank equals 0 and then you will blame them and they'll tell you "you asked if it were valid and we said yes you didn't ask if it had any implications!!" We care therefor we tell you everything wether you like it or not. Link to comment https://forums.phpfreaks.com/topic/186554-is-this-legal/#findComment-985440 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.