gdfhghjdfghgfhf Posted November 19, 2009 Share Posted November 19, 2009 Ok basically what i want to do it a redirection system with a temporary page..... just like anonym.to if you go to http://anonym.to/http://www.phpfreaks.com it will display a temporary page then redirect you to phpfreaks.com normally i would just do that with $_get but the damn limit of characters is only 100, so it will not work with long URL how exactly is anonym.to working ? It looks like a htaccess redirect, but how can you transmit values through htaccess then take back this value in your php code just like $_GET does any suggestions? btw i want to avoid using $_POST if possible... Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/ Share on other sites More sharing options...
Trizen Posted November 19, 2009 Share Posted November 19, 2009 all that is doing for the redirect is <meta http-equiv="refresh" content="1; URL=http://www.phpfreaks.com"> Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-960865 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted November 19, 2009 Author Share Posted November 19, 2009 i think you didn't understand what i want to do i want to make a script that i can access just like anonym.to http://www.mywebsite.com/myscript.php?redirection=http://www.phpfreaks.com/a_very_long_url_that_exceeds_100_characters/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.php and if i access this URL, then it will display some text and redirect 5 seconds after my only problem is that i can't use $_GET because the limit is 100 characters Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-960869 Share on other sites More sharing options...
Trizen Posted November 19, 2009 Share Posted November 19, 2009 i know what you mean about the limit of 100 characters howver i need more information than that to help maybe a sample of what you have done to get my mind in the right place. Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-960870 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted November 19, 2009 Author Share Posted November 19, 2009 here's an example: file.php <?php $url = $_GET("url"); echo "<meta http-equiv=\"refresh\" content=\"1; URL=$url\">"; ?> now if i access "file.php?url=http://blabla.com" using a url longer than 100 characters it won't work Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-960942 Share on other sites More sharing options...
mrMarcus Posted November 19, 2009 Share Posted November 19, 2009 i don't know where you're getting this "$_GET having a limit of 100 characters", 'cause that's simply not true. you can go up to, and even exceed in some browsers, 4000+ characters. so, you'll be quite fine with 100 characters. trust me. what happens when you try a string of over 100 characters? Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961000 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted November 19, 2009 Author Share Posted November 19, 2009 damn.... actually i didnt try it because i found a lot of pages saying it is limited to 100 chars on google.... like this page (first result in google when i type $_GET) http://www.w3schools.com/PHP/php_get.asp "Note: The get method is not suitable for large variable values; the value cannot exceed 100 characters." ill try it now! Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961007 Share on other sites More sharing options...
mrMarcus Posted November 19, 2009 Share Posted November 19, 2009 i just tested a string at 5283 characters long using the $_GET supoerglobal. the number will vary for each browser, however, but any modern browser should accommodate large numbers. and man, you gotta try things. i don't even know what to say on that one. how doesn't curiosity get the best of you? it's not even my problem and i tried it just to see how many characters i could squeeze into the url. my server allows me to have 8162 bytes/characters in a string. Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961014 Share on other sites More sharing options...
mrMarcus Posted November 19, 2009 Share Posted November 19, 2009 Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send (max. 100 characters). they must share your same level of curiosity where this information is being gathered and how it ended up on a reputable website like w3schools.com is beyond me. i know that different browsers set different limits, so perhaps IE6 and less had a limitation of 100 using GET, but that sure ain't the case now. i would assume passing strings/variables via form using the GET method might have some string length limitations as the headers being sent might play a factor, but it has become quite clear: believe nothing, test everything. Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961026 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted November 20, 2009 Author Share Posted November 20, 2009 Yeah but to me W3C was a source as serious as the php manual, but oh well... But if old browsers are still limited to 100 chars then my script wont be compatible with old browsers?? Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961597 Share on other sites More sharing options...
emopoops Posted November 20, 2009 Share Posted November 20, 2009 yeah but WHY ON EARTH WOULD ANYONE USING AN OLDER BROWSER expect to have compatibility with webpages? none the less. why would anyone be using an older browser... ? Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961631 Share on other sites More sharing options...
premiso Posted November 20, 2009 Share Posted November 20, 2009 But if old browsers are still limited to 100 chars then my script wont be compatible with old browsers?? Does that matter? At least 95% of users online are using IE6, FF 1.x etc, all which can handle that data just fine. You are only leaving out 5% (As a high estimation), not a huge issue at all. If it bothers you, you can create a hash of the original address and store it in a database and just link the hash. So on the gotoPage.php?hash=asdfs34r52w023943204 it will be less than the 100 characters and it will still take people to the right address. Other than that, do not worry about the 5% and go for it. Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961634 Share on other sites More sharing options...
emopoops Posted November 20, 2009 Share Posted November 20, 2009 i dont think 95% are using firefox 1.x dude. if u think thats the latest version. wait till u try 3.x.x(3.5.5) Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961691 Share on other sites More sharing options...
Cardale Posted November 20, 2009 Share Posted November 20, 2009 i don't know where you're getting this "$_GET having a limit of 100 characters", 'cause that's simply not true. you can go up to, and even exceed in some browsers, 4000+ characters. so, you'll be quite fine with 100 characters. trust me. what happens when you try a string of over 100 characters? Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send (max. 100 characters). they must share your same level of curiosity where this information is being gathered and how it ended up on a reputable website like w3schools.com is beyond me. i know that different browsers set different limits, so perhaps IE6 and less had a limitation of 100 using GET, but that sure ain't the case now. i would assume passing strings/variables via form using the GET method might have some string length limitations as the headers being sent might play a factor, but it has become quite clear: believe nothing, test everything. reputable? W3 Schools is just another company trying to throw on more standards to try and own programming. HTML 2.0 or what ever is garbage. Unless your going to add new functions to HTML leave it alone. Just make standards and stop. They keep revising and revising and revising. They have nothing left to revise for cryin out loud. It is HTML!!!! Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961696 Share on other sites More sharing options...
Cardale Posted November 20, 2009 Share Posted November 20, 2009 yeah but WHY ON EARTH WOULD ANYONE USING AN OLDER BROWSER expect to have compatibility with webpages? none the less. why would anyone be using an older browser... ? I heard you there. Backwards compatible is stupid. If a person doesn't have the newest tech then they don't get the newest software. That simple. Then again I could see how large corporations such as Microsoft and Apple might try and exploit this type of mentality or even intel and amd. Adding multiple cores on top of multiple cores. They can't make them much faster so they just add more cores now. Haha. Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961698 Share on other sites More sharing options...
emopoops Posted November 20, 2009 Share Posted November 20, 2009 yeah or big companies selling the latest version of firefox that coincides with the latest webstandards for thousands of dollars! Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961705 Share on other sites More sharing options...
premiso Posted November 20, 2009 Share Posted November 20, 2009 i dont think 95% are using firefox 1.x dude. if u think thats the latest version. wait till u try 3.x.x(3.5.5) I do not think that 95% are using those, I just was not very clear, the etc means those versions plus the versions that came after, the point was that everyone on the web is "at least" using those. My bad for not making it clearer Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-961946 Share on other sites More sharing options...
emopoops Posted November 23, 2009 Share Posted November 23, 2009 oh yeah i dont think anyone whos is sane is using 1.x Quote Link to comment https://forums.phpfreaks.com/topic/182125-redirection-with-temporary-page/#findComment-963610 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.