How to give a php link to image source (<img src=)
Posted: Thu Nov 11, 2010 5:23 pm
First we need to make the php page. Name it as test.php.
now we can provide the php page as img source as below.
Code: Select all
<?PHP
$image = imagecreatefromstring(file_get_contents("http://yoururl.com/img.jpg"));
header('Content-Type: image/png');
imagepng($image);
imagedestroy($image);
?>
Code: Select all
<html>
<body>
<img src="test.php">
</body>
</html>