seany123 Posted August 11, 2009 Share Posted August 11, 2009 Basically all i wanna do is have 2 text boxes... one is what a person types in a message then then hit submit button and in the text box below it shows the message upside down... but there is not a upside down font so im a little stuck in how i could do this. basically just like this: http://www.fliptext.org/ Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/ Share on other sites More sharing options...
SetToLoki Posted August 11, 2009 Share Posted August 11, 2009 Basically all i wanna do is have 2 text boxes... one is what a person types in a message then then hit submit button and in the text box below it shows the message upside down... but there is not a upside down font so im a little stuck in how i could do this. basically just like this: http://www.fliptext.org/ javascript may be your best option, or the php gd libary if you could somehow save the text as an image. worth looking into. Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895878 Share on other sites More sharing options...
alexdemers Posted August 11, 2009 Share Posted August 11, 2009 For every letter find it's upside down ASCII value. On Windows, click Start (or the windows logo) then Run. In the run dialog, type "charmap" press enter. Now, let's say the user types "A", now look at the character map table and look for an upside down "A". Then, break down the user's string into an array and to str_replace of each of the letters.... and go on from there. Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895879 Share on other sites More sharing options...
Maq Posted August 11, 2009 Share Posted August 11, 2009 Don't copy their code but it's available to view and get an idea of what to do. http://www.fliptext.org/flip.js Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895882 Share on other sites More sharing options...
seany123 Posted August 11, 2009 Author Share Posted August 11, 2009 hiw did u get that code? Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895886 Share on other sites More sharing options...
Maq Posted August 11, 2009 Share Posted August 11, 2009 I asked the server for it. Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895889 Share on other sites More sharing options...
Psycho Posted August 11, 2009 Share Posted August 11, 2009 I asked the server for it. Did you say "please"? I notice the code doesn't handle upper-case characters - it transforms them all to lower-case when it "flips" them. I guess there isn't upside down equivalents for them all. Plus, some lower case letters aren't made upside down (at least the z isn't) Interesting feature, but I'm not sure I see a practical implementation. Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895896 Share on other sites More sharing options...
Maq Posted August 11, 2009 Share Posted August 11, 2009 Did you say "please"? No I said, "Gimme that code now bitch". I notice the code doesn't handle upper-case characters - it transforms them all to lower-case when it "flips" them. I guess there isn't upside down equivalents for them all. Plus, some lower case letters aren't made upside down (at least the z isn't) It was just to give him an idea. You're right, there probably isn't an upside-down equivalent to the entire upper case alphanumeric charset. Interesting feature, but I'm not sure I see a practical implementation. Yeah who knows... Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895904 Share on other sites More sharing options...
seany123 Posted August 11, 2009 Author Share Posted August 11, 2009 Are there really no other ways of doing this? maybe displaying the Text box upside down? or i dunno anything? Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-896013 Share on other sites More sharing options...
br3nn4n Posted August 11, 2009 Share Posted August 11, 2009 maybe displaying the Text box upside down? LOL! Now that would be cool...to be able to set a text box to any angle I would say as well to try the GD library and just place it in an image. I think you could easily write some text to an image and then flip the whole image. Tut on writing text to an image: http://www.phpfreaks.com/tutorial/php-add-text-to-image Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-896026 Share on other sites More sharing options...
seany123 Posted August 11, 2009 Author Share Posted August 11, 2009 but then could the text be copied out again? Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-896058 Share on other sites More sharing options...
br3nn4n Posted August 12, 2009 Share Posted August 12, 2009 Nope. It would be an image...but you could make it just look like it's only text by only making an image the size of the text... Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-896162 Share on other sites More sharing options...
.josh Posted August 12, 2009 Share Posted August 12, 2009 you would not be able to copy/paste the upside down text unless the user has a specific font for it on their own computer. So you may as well forget that. Easiest thing is to follow the tutorial in the link. One of the functions used in it has an optional argument to set the angle of the text. It is briefly mentioned in the tutorial. Go to the manual entry for that function to learn about it. Quote Link to comment https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-896164 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.