1,234
edits
Changes
→Specs
That will create "result.png" on the server (make sure Apache has permissions to write to that directory) and return the URL to the client which will replace the image without reloading the page. You cannot use a frame or iframe, you have to use XMLHttpRequest.
Limitations: * It doesn't matter what size the image is or what colours you use as long as the result is clearly visible.* It's ok if your server code will not work for more than one concurrent request.* It's not required but it's easy enough - have a look at escapeshellcmd() and figure out what it's for. If you don't use it - you end up exposing your matrix account to anyone who knows where your assignment is stored.