0

How can I make a PHP page that will return image from other server specified by url in variable, like this:

http://www.mypage.com/MyScript.php?src=http://www.otherpage.com/image.png

And after going to that page an image should apear.

It need to work for any other srcs too.

(Why like this? I want to try bypass the Security Error that apears using toDataUrl from canvas while using image not from the same domain, by using http://www.mypage.com/MyScript.php?src=http://www.otherpage.com/image.png as a image src used in canvas)

4

2 回答 2

0

MyScript.php$_GET['src']用作图像的来源

<img src="<? echo $_GET['src']; ?>" />
于 2013-11-10T18:58:30.840 回答
0

你可以试试

echo file_get_contents($_GET['src']);
于 2013-11-10T18:59:09.250 回答