Hi
I am trying to get to download images into a file from database field urls onto my server as there is lots of them. I think im on the right track.
I currently have an error
Parse error: syntax error, unexpected T_STRING in getimages.php on line 11
Hope someone can help with this please.
<?php
mysql_connect("localhost", "X", "X") or die(mysql_error());
mysql_select_db("X") or die(mysql_error());
$query = "SELECT * FROM TABLE";
$result = mysql_query($query) or die(mysql_error());
while($file = mysql_fetch_array($result))
{
$image = file_get_contents(' . $file[' . image . ']. ');
$path = 'images/' . $file[' . image . '] . ';
file_put_contents($path, $image);
}
?>