[thelist] Server Side Includes / Remote host
Anthony Baratta
anthony at baratta.com
Thu Jan 15 23:42:33 CST 2004
At 04:16 PM 1/15/2004, Warbasse Design - Info wrote:
>The result, in each case, is a page that pulls in the code of the image
>instead of the image itself. Any help to get me across the finsh line would
>be greatly appreciated.
Two options
One - do with with Javascript. IIS does not support EXEC with SSI.
Two - what you want to do is have the EXEC'd CGI script talk to another
script on your server. This script will hand over the HTML code that points
to the target image. The HTML code is then passed to the browser.
e.g.
#!/usr/bin/perl -w
use LWP::Simple;
$cgiReturn = get http://www.mydomain/nextad.cgi?id=ClientID;
print $cgiReturn;
exit;
Then
nextad.cgi
#!/usr/bin/perl -w
# routine to randomly pick ad image
print &GetMeNextAd();
The HTML returned would look like this:
<image src="http://www.mydomain/ads/ad1.jpg">
This would then be embeded in the HTML, sent to the browser and then
rendered by the browser.
More information about the thelist
mailing list