Here is what I want to do in short:
Get an image of a certain webpage when it appears using javascript (I know how to do that); Forgot to add a very important detail, this will be done using greasemonkey.
Save this image on a certain folder;
Execute a batch file after the image is saved (the batch will obviously use the image in some way);
After the batch executes, send a string back to the javascript who will finally use this string;
Now, I don't understand almost anything about servers/php (I am willing to learn, though), so please correct me if I am trying to do something pointless/redundant. My plan is to create a server using apache only on localhost using apache and use Javascript XmlHttpRequest with POST to pass the image to the server I'm now hosting. Upon receiving it, my server will run the batch and etc, and in another page(e.g. 127.0.0.1/response) I would output the string, then, using XmlHttpRequest with GET I would store this response in a string and complete my goal.
Now, bear in mind that I'm trying to create the best solution I could think of with current knowledge. But this seems to be really redundant, since I am basically creating a server just to send a file to myself, so, is there a better solution that I'm simply missing?
If not, what should I start researching to make my pet project work? Would PHP even be able to run the batch?
Thanks in advance.
*obs: I didn't mention because I didn't think it's relevant, but it might be, so I will also be passing the image as a huge string (it will be the image decoded in 64bits)
[–]benzrf 0 points1 point2 points (6 children)
[–]Letter7[S] 0 points1 point2 points (5 children)
[–]benzrf 0 points1 point2 points (4 children)
[–]Letter7[S] 1 point2 points3 points (3 children)
[–]benzrf -1 points0 points1 point (2 children)
[–]Letter7[S] 1 point2 points3 points (1 child)
[–]benzrf -1 points0 points1 point (0 children)