I'm hitting the wall on trying to pull images from another server. We have two servers. Server A contains the php files/website. Server B contains the MySQL database & image files.
I've successfully pulled the data from the DB on Server B to A; however I keep getting a File Error when trying to display the images. I am able to successfully pull in a static image, but not successful with this coding.
File Error!
http://xx.xx.xxx.xxx/birkeys/dealerservices/images/auto/S657417-1.jpg
As a note, server B does not have a domain name associated with it yet - trying to access via the ip address.
Any thoughts?
<?
if (!empty($row_AUTO_SKU_WS['Pictures'])) {
$images = explode(" ", $row_AUTO_SKU_WS['Pictures']);
$images = str_replace(' ', '', $images);
$count = count($images);
$fullpath = "http://xx.xx.xxx.xxx/birkeys/dealerservices/images/auto/".$images[0];
}
if (isset($images)) {
if (file_exists($fullpath)) {
echo "<a href=\"http://xx.xx.xxx.xxx/birkeys/dealerservices/images/auto/".$images[0]."\" rel=\"lightbox[thumbnails]\"><img src=\"http%3A%2F%2F69.80.208.156/birkeys/phpThumb.php?src=/birkeys/dealerservices/images/auto/".$images[0]."&w=375px\" alt=\"\" style=\"border: solid 1px #333; margin-bottom: 11px;\" /></a>";
$count--;
$i=1;
while($i<=$count) {
if ($images[$i] != "") {
echo "<a href=\"http://xx.xx.xxx.xxx/birkeys/dealerservices/images/auto/".$images[$i]."\" rel=\"lytebox[thumbnails]\"><img src=\"http://xx.xx.xxx.xxx/birkeys/dealerservices/images/auto/".$images[$i]."&w=116px&h=87\" alt=\"\" style=\"border: solid 1px #333; margin: 0px 11px 11px 0px;\" /></a>";
}
$i++;
}
} else { echo "File Error!<br/>".$fullpath; }
} else {
echo "<br/>No Preview Available<br/>";
}
?>