How to put image in PHP?

As you can realize the pressing the button and getting the image sent to me in response to the server in php? (the button works for js)
July 8th 19 at 15:53
4 answers
July 8th 19 at 15:55
July 8th 19 at 15:57
The button is not "does the magic", the button calls the script, the result of which will be Ajax request to the server, in response to which the server will send the answer - in this case it is likely the url of the picture. If you need to get this url without any clicks - open requests - in developer tools of any popular browser and see where the request was submitted after clicking the button, and what parameters were used. Next trick - curl or file_get_contenet - get the server's response.
fl.ru/login for example, clicking on the checkbox here - how to get Url? - gunnar.Barrows commented on July 8th 19 at 16:00
type such that: hostingkartinok.com/show-image.php?id=4c36c6759d6b... - lily.Kozey commented on July 8th 19 at 16:03
: This is all I watched. I even somehow almost got the picture -- however, where there is to send a reply to check at all clear. - gunnar.Barrows commented on July 8th 19 at 16:06
July 8th 19 at 15:59
Ajax something like this:
$.ajax({
 type: 'POST',
 url: 'http://example.com/index.php',
 data: { // here send post parameters to the server
 'foo': 'bar', 
},
 success: function(data){
alert(data);
}
});
Before you parse the image I need to click on the button to get it. - gunnar.Barrows commented on July 8th 19 at 16:02
www.w3schools.com/jsref/event_onclick.asp - lily.Kozey commented on July 8th 19 at 16:05
: Okay, how to do it in php? - gunnar.Barrows commented on July 8th 19 at 16:08
: to simulate clicking the button by using PHP or what? - gunnar.Barrows commented on July 8th 19 at 16:11
July 8th 19 at 16:01
$.get('/index.php?getImage', function(data) {
...
});


You will get a link or the direct file ?
I get js. The example on this page fl.ru/login - clicking on the checkbox. - gunnar.Barrows commented on July 8th 19 at 16:04

Find more questions by tags ImagesParsingPHP