tags:

views:

85

answers:

3

Hello everyone, I need to send a signal via my remote PC to the Internet that let me know if this pc is connected. I could send a link with GET values to my page and then from that php page make a query to the database. How do I send this value through a C program that runs on this remote PC? thanks!

(it's a windows pc)

+4  A: 

For making HTTP requests I recommend libcurl, which is the library that almost everybody seems to be using.

http://curl.haxx.se/libcurl/

Tronic
with devc++ i have problems in include library files. what is a better c compiler? thanks
frx08
I keep hearing devc++ is old and abandoned, people recommend code::blocks or similar. You can also download free Express versions of MSVC. (free as in beer)
Arthur Kalliokoski
A: 

What about using a client like dyndns? I'm not sure using a C program would be such a good idea for that purpose; it's a system administration task and using scripting for this would work best, unless you have a specific need in mind.

lorenzog
+1  A: 

What operating system? Linux? Windows? Does the program need to be cross-platform? The reason I ask is that it influences whether you should use a library, or TCP/IP sockets, given that the request will be very simple.

Also, why not use Perl, or better yet, wget? You could schedule a task in windows, or a cronjob in unix, to wget http://yoururl/path?pcname=`uname` or similar..

PP
it is windows, I could use sockets?
frx08