I'm trying to learn about the FM PHP API. However, Im having quite the trouble with GetContainerDataURL.
Firstly, what I'm trying to do is to get an image from a specific post to display, unfortunally, I only get a "broken picture". I followed the example in the FMS 16 CWP guide, using this exact code (except I switched out "container" for my own field).:
echo '<img src="'.$fm->
For some reason, this doesnt work for me. All I get is a broken picture. When I grab the link from getContainerDataURL, it is as follows: http://websitename.com/123.456.79.011/fmi/xml/cnt/picture.jpg?-db=databasename&-lay=layoutname&-recid=1&-field=fieldname(1).
To break it down, I get both the domain name and the ip to the server inside the URL. If i remove http://randomwebisite.com and just leaves it as ip-adress/fmi/xml/cnt/picture.jpg?-db=databasename&-lay=layoutname&-recid=1&-field=fieldname(1), the picture works.
Why is that?
And does anyone got a good solution to remove the "http://websitename.com/"?