Should be pretty easy, assuming you know the basics of connecting to a database with PHP. Just have a table of banned IPs, and add to them whenever the form is called. Make sure you've got strong security on the banform, or you'll be in a world of pain.
Is that the actual command you want to run? If so, it will be far easier to simply code it in C rather than using shell commands.
If the shell line can't be programmed in C for some reason, look into something like a FIFO or socket. Put one in /tmp, send output to it from the shell, and...
I've gotten closer - this is the query now:
SELECT FirstVisit,
COUNT(IF(Provider="AAAA",1,NULL)) AS "AAAA",
COUNT(IF(Provider="BBBB",1,NULL)) AS "BBBB",
COUNT(IF(Provider="CCCC",1,NULL)) AS "CCCC"
FROM proc_log GROUP BY FirstVisit ORDER BY FirstVisit;
It gives the results I'm...
This is my current query:
SELECT FirstVisit, COUNT(*), Prov1 FROM pat_dat GROUP BY FirstVisit, Prov1 ORDER BY FirstVisit;
Which produces output like this:
+------------+----------+-------+
| FirstVisit | COUNT(*) | Prov1 |
+------------+----------+-------+
| 2005-12-06 | 1 |...
You may compile it yourself, or grab a binary. If you're running Linux/Unix, it will probably be available in your package management system. If you're running Windows, grab a binary from GNUWin32.
Grab the setup program, and you shouldn't have to worry about dependencies.
To get the HTML...
You are misunderstanding both atoi and character strings.
for(j=0;j<4;j++){ ... }
This will limit the size of the numbers to 4 digits, which you probably don't want.
for(t=0;t<10;t++){
if(atoi(x[i][j])==0){
buffer++;
printf("%d",buffer);
printf("\n%d,%d\n",i,j);
}...
The point of MinGW is that it does not require cygwin. If yours did, I bet you installed it incorrectly. More likely, you were using the Cygwin compiler and merely thought it was MinGW.
I'm not sure how the setup is on FreeBSD, but on (Gentoo) Linux it's literally two commands to setup mySQL in a secure configuration once it's installed. Probably the same for other databases, such as SQLite and PostgreSQL. I'm sure it will be easier than creating your own half-database setup.