Jump to content

redirection with temporary page


gdfhghjdfghgfhf

Recommended Posts

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...

Link to comment
Share on other sites

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

 

 

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 :(

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :P  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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :P  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!!!!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.