From a C program running from a local system, when it first executes, I would like check its ID against a text file located on a remote FTP site or a website. At that FTP site, there will be a text file that looks something like this:
ID_NUMBER ALLOW
12345 yes
11111 no
22222 yes
So let's say the user executes this executable program from location 1. His PC's ID is designated as 12345. The C program checks my FTP site, and ID 12345 is allowed to execute. The executable program has permission, and it just continues at that location 1.
At location 2, that PC's ID is designated as, let's say, 11111. As the executable C program runs, it checks that text file on my FTP site, and sees that ID 11111 does not have permission (or that ID is not on the list), the C program simply gives an error message to the user, and then, stops.
How would I go about implementing something like this? Thanks.