frx08
frx08

Reputation: 4432

send data internet using C

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)

Upvotes: 1

Views: 513

Answers (3)

PP.
PP.

Reputation: 10865

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..

Upvotes: 1

lorenzog
lorenzog

Reputation: 3609

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.

Upvotes: 0

Tronic
Tronic

Reputation: 10430

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

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

Upvotes: 4

Related Questions