Jump to content

Recommended Posts

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/

Link to comment
https://forums.phpfreaks.com/topic/169818-upside-down-text/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895878
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895879
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895896
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-895904
Share on other sites

maybe displaying the Text box upside down?

 

LOL! Now that would be cool...to be able to set a text box to any angle :D

 

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

Link to comment
https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-896026
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/169818-upside-down-text/#findComment-896164
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.