[thelist] possible jscript/php/frames question!!

Maximillian Schwanekamp lists at neptunewebworks.com
Sat Jun 18 14:49:48 CDT 2005

bruce wrote:
> i checked out your sample app... it might work...
> i could create a separate/2nd page and do the post to that page, and store
> the x/y coordinates in a session array... on the 2nd page, i could also
> encrypt the information before i store it, i could then display the array on
> the 1st page, much like what you do....
> questions:
>  -could i access the POST information as $submit_x/$submit_y, and why? what
> in PHP gives me these variables? you do an extract. is that a PHP function,
> or one of your own creation?

PHP function. Mainly useful when you're putting array values into a string.

> -does this test app give different results if the user is scrolling? does
> the test work on all browsers? a quick test seems to indicate that scrolling
> doesn't affect the results, and a test on IE/Firefox seems to give similar
> results...

No. This is pretty basic HTML stuff.  The x/y bit is in the spec.  See
"image" type at:

> so, if the questions/issues i raised are positive, then my next issue is to
> determine how to go about creating a process to build image maps(images)
> comprised of the random shapes that i initially discussed....

Random shapes?  I don't recall you mentioning that earlier in the
thread.  If you need to generate shapes on the fly, you'll need image
generation, which is usually non-trivial.

You might check out one of the image classes at phpclasses.org.  I
believe there are a few classes to make generating shapes a simple
matter.  You could then send an image map to match the points you used
to create the shape.

> if this is reasonably doable, this should give me the ability to create an
> image comprised of random shapes... have the user select the items in the
> image, with me storing the (x.y) coordinate locations, being able to encrypt
> them, and then sending the information/array back to the server...

If you're creating random images on the fly, and need the user to be
able to click multiple points, and then take all that info and post it
somewhere, you should probably go to Flash instead.  What you're
decribing sounds a lot like a real basic Flash game (something like
"shoot the woozle").  You could still collect the info and send it to a
php script for processing.

It would help to have some idea of what you're trying to accomplish.
Can you give us some more info?

Maximillian Von Schwanekamp

More information about the thelist mailing list