Home  >  Article  >  Backend Development  >  How can I get the link of the image loaded in canvas using php.

How can I get the link of the image loaded in canvas using php.

WBOY
WBOYOriginal
2016-10-22 00:14:321277browse

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.

Reply content:

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn