Home > Article > Backend Development > How can I get the link of the image loaded in canvas using php.
1. There are some pictures in the canvas. I want to use php to get the links to the pictures in the canvas and download the pictures to this machine.
2. If it is an image on a web page, you can get the image path, and then use a function similar to file_get_contents to download the image to the local machine.
3. The current problem is that I cannot get the paths of these images in the canvas.
4. I would like to ask if there is a way to get the path of the image loaded in canvas using php.
1. There are some pictures in the canvas. I want to use php to get the links to the pictures in the canvas and download the pictures to this machine.
2. If it is an image on a web page, you can get the image path, and then use a function similar to file_get_contents to download the image to the local machine.
3. The current problem is that I cannot get the paths of these images in the canvas.
4. I would like to ask if there is a way to get the path of the image loaded in canvas using php.
There are generally two methods for PHP acquisition:
First, crawl through the rule page
Second, submit the previous page to PHP for processing through ajax
You can save the paths of these images in a variable when canvas gets images. When canvas toDataURL, you can submit this variable to the background