KingOfHeart Posted September 22, 2010 Share Posted September 22, 2010 I'm creating a little file search on my site. You can search by the name of the file or the type. You can order it by random or by a certain type. You can choose ascending or descending order. Also it will need to know the current page number. So that means my url is going to have a lot of & symbols in it. What method should I use to create a short url string. base64_encode? (How should I separate the string if the answer is yes). Should I just use Sessions (do all browsers support this?)? I'm not sure at this point. http://openzelda.thegaminguniverse.com/file.php?type=2&order=1&dir=0&page=2 This is the current page but will be changed to this (assuming I don't break it by the time you view it) http://openzelda.thegaminguniverse.com/fileb.php Link to comment https://forums.phpfreaks.com/topic/214068-shortest-url-string/ Share on other sites More sharing options...
ShibSta Posted September 22, 2010 Share Posted September 22, 2010 The vars passed in the query string are needed for site functionality. The only way to avoid them would be to use $_POST instead of $_GET. As far as creating short URL's, you can look into mod_rewrite but the fact that you'll still need access to those variables remains. When using $_POST, you won't be able to copy the url and send it to someone for them to see the search results. Depending upon the type of site you're building, that may be a determining factor in making a decision between GET and POST. Link to comment https://forums.phpfreaks.com/topic/214068-shortest-url-string/#findComment-1113943 Share on other sites More sharing options...
KingOfHeart Posted September 22, 2010 Author Share Posted September 22, 2010 Yes, but it can be converted in the url then uncovered through php. I've done it before. I also had to separate the data apart. Link to comment https://forums.phpfreaks.com/topic/214068-shortest-url-string/#findComment-1113950 Share on other sites More sharing options...
KingOfHeart Posted September 22, 2010 Author Share Posted September 22, 2010 Quick question. If I just use POST how would I handle the page numbers? How can you click on different pages and still have the same results from the form script? Link to comment https://forums.phpfreaks.com/topic/214068-shortest-url-string/#findComment-1113956 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.