M
M
Max Payne2016-06-08 00:10:33
PHP
Max Payne, 2016-06-08 00:10:33

How to parse an image in PHP?

How can I implement clicking on a button and getting an image that the server will send me in response to php? (button works on js)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
entermix, 2016-06-08
@entermix

Try PhantomJS

T
ThunderCat, 2016-06-08
@ThunderCat

The button does not "do magic", the button calls a script, the result of which will be an Ajax request to the server, in response to which the server will send a response - in this case, most likely the image url. If you need to get this url without any clicks - open requests - in the developer tools of any popular browser and see where the request was sent after clicking the button and with what parameters. Next, it's a matter of technology - curl or file_get_contenet - pull out the server's response.

A
Archakov Dennis, 2016-06-08
@archakov06

$.get('/index.php?getImage', function(data) {
...
});

Do you get a link or a direct file?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question