Hi!

First of all I wasn't sure if it's a server-side problem or a client-side problem so please forgive me if I made a mistake!

I can create a CGI that will send any kind of data (I'm a programmer).
The thing is, I want my CGI to be able to do this:
If a client has a webpage, what should he insert into the source of the page (it's a simple HTML file) that will make a contact to my CGI and then get an image plus a link?

To make it clear:
The client has this code in his HTML file:
HTML Code:
 
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
***** here I want something that will connect my CGI in 'http://somewhere.com/cgi-bin/cg' and this line will be replaced with an HTML code that displays an image and has a link *****
</body>
</html>
 
The target is to be able to let other webpage owners put some kind of a code inside their HTML and that will connect my server. Then my server will send them some HTML code to be placed where their code is.

So what should I do? Can it be solved with HTML or any kind of scripting like JavaScript/VBScript ?