containerBridge.php file

Discussion created by MetaSys on Aug 29, 2013
Latest reply on Aug 29, 2013 by steve.winter

To display FileMaker container field on web pages using FileMaker PHP API, I am using containerBridge.php file.

I have written following code to display the container data (which is an image file).


$Map= currentRecord->getField(‘Map’); //This is a Map field which contains Map image


<img src="containerBridge.php?path=<?php echo urlencode($Map)?>" border='0' width="170" height="129" >

And, in containerBridge.php page, I have written following code:


//Connection details to connect database.

$connection =& new FileMaker($database = $database);

//Use following if database and web server are on same machine (One machine configuration)

$connection->setProperty('hostspec', $hostspec);

$connection->setProperty('username', $username);

$connection->setProperty('password', $password);

echo $connection->getContainerData($_GET['path']);


Using this method, in HTML web page source view (browser source view), I am getting following <img> tag with container path details:

<img src="containerBridge.php?path=%2Ffmi%2Fxml%2Fcnt%2FBM%25202N.jpg%3F-db%3DTest_Project%26amp%3B-lay%3DWeb_TestLayout%26amp%3B-recid%3D2%26amp%3B-field%3DImage%281%29" border='0' width="170" height="129">

So, in this case, I am facing problem while making this images as a “search engine friendly”.

Is there any other way to display the FileMaker container images on web pages using PHP instead of using containerBridge.php, so that it just give me only <img src=’image001.jpg’ border='0' width="170" height="129" > source code in browser source view?

Thanks, MetaSys