Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 342397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:48:00+00:00 2026-05-12T10:48:00+00:00

Ok well heres what I would like to do in PHP: http://www.wordle.net/ I know

  • 0

Ok well heres what I would like to do in PHP:

http://www.wordle.net/

I know how to do all of the GD (writing to the canvas), my issue is the logic of actually keeping track of different sized word boxes and correctly placing them on a blank canvas. If anyone knows of a good site that has some resources that could lead me in the right direction I would love you forever!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:48:00+00:00Added an answer on May 12, 2026 at 10:48 am

    Well you can use imagettfbox (see also http://ruquay.com/sandbox/imagettf/) to get the canvas boundaries of the tag text you created – given a font, rotation and size (which obviously depends on the number of occurrences of any given tag).

    From that point you can start placing the tag words (randomly? – see edit) in the cloud canvas, until all of them are placed. You just have to make sure they don’t overlap (ie you can store the pixel coordinates in a array).

    One other thing that you need to make sure is to make the image canvas big enough (or the font size small enough) to accommodate all the tags, so you’ll need to precalculate (again, using imagettfbox) the exact pixel size of each word and after you’ve reached a size where all the words can fit inside the image canvas you can start placing them using imagettftext.

    EDIT: You can also learn a lot (and maybe contact the developer) by taking a look at the credits, for example:

    Thank you, Martin Wattenberg, for the
    central idea of just throwing stuff at
    the screen until it fits. I raise my
    glass to the philosophy of “the
    dumbest possible thing that works.”

    And much more…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't understand PHP very well... not good start I know. I'm using http://detectmobilebrowsers.mobi/
I know this is very newbyish but I have been using php.net for refernce
The following is passed to the browser: http://localhost/like.php?f=1 where f=1 is the article ID
Well i am here writing some constraints for a db I am working on
Well i need some help here i don't know how to solve this problem.
I know SQL well but I must be missing something really dumb here. This
Well I am trying to sort some data in PHP. Here is an example
I would like to create rewrite rules in my .htaccess file to do the
I know this isn't a straightforward question but I would really appreciate some feedback
Ok. I recently made some updates to this website. http://annberingerart.com/index.php Upon making some minor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.