QUOTE(RobG @ 7 Jul, 2009 - 10:11 AM)

Many thanx Perfectly.Insain, this may be a watershed for me, not quite sure yet.
HTTP no probs. Perl on the other hand, Ive always stood well back from, apart from
my occasional trips into Symbian Ive never really needed it. But I suppose if that's
what it takes to join the ranks of Network Coders then so be it. That said, can't
get it to work at the moment. Ive tried Dev, Code:Blocks and Borland, none will wear
it. A couple of hours on the web and the best I can find are one or two commercial enterprises
offering purpose designed libraries allowing Perl to be inserted into c++.
I've got the obvious includes in place ...
#include "c:\Perl\lib\core\EXTERN.h"
#include "c:\Perl\perl.h"
Maybe I've missed something or could be that I'm just plain thick. Please tell, how's it done?
Actually, the idea is to set up a web service that is
separate from your client program. The example I provided can be used with an Apache HTTP server as a CGI script. This web server should be accessible on the Internet by the client system (where your C++ program is running).
Let's say that the computer running the HTTP server has a domain name of hostnamereporter.net pointing to it, and the script name is hostname.pl, residing in the cgi-bin directory. If I point a web browser to
http://hostnamereporter.net/cgi-bin/hostname.pl, if the server is set up correctly, it should report my host name (as resolved by reverse lookup). I can write a C++ program that does the same thing (connects to hostnamereporter.net on port 80, sends a GET /cgi-bin/hostname.pl HTTP/1.0, and reads the result).
There are other ways of implementing the service, such as using server-side preprocessing (PHP, ASP), SOAP, XML-RPC, or even a custom protocol, but I'm using CGI as an example because it's simple and there is quite a bit of existing information about it.