i need help in the implementation of my project DSL Download Organizer

hey guys my project is about how to limit the download and the upload from the internet, and it will be run on a server connected on many pcs, so the server will organize the limit of each pc, and manage the download and upload, and if one exceed it limit it sends a warrning message.
but i face a problem during implementation in c++, first i used the buffer to control the limit, but i don t know how i can kno if any pc use the internet browser to download or upload and how i can get the data from the internet browser and transfer it to bytes and stor it in the buffer:
this is my code:
setlimit(int limit, int nbofpc)
{
Float limitbypc;
Limitbypc = limit/nbofpc;
For(int i=0; i Char buffer [limitbypc];
Return 0;
}

if(download) //how i can know ??????????
{
void downloadlimit( )
{ AnsiString IP;
For(int i=0; i Switch (IP)
{Case ‘10.15.1.157’: buffer[limitbypc] = fputs(data); //?????? how i can get the data from the internet browser and store it by bytes in the buffer.
If(sizeof(data)) == sizeof(buffer)
WriteString (“you can’t download more”); break;
Case ’10.15.1.158’: buffer[limitbypc] = fputs(data); break;?????????
If(sizeof(data)) == sizeof(buffer)
WriteString (“you can’t download more”); break;
……………
Case’10.15.1.164’: ……….; break;

}
}
Return 0;}}

if(upload) //how i can know ??????????
{
void uploadlimit( )
{ AnsiString IP;
For(int i=0; i Switch (IP)
{Case ‘10.15.1.157’: buffer[limitbypc] = fputs(data); ??????how i can get stor the data befor upload it by bytes in the buffer
If(sizeof(data)) == sizeof(buffer)
WriteString (“you can’t upload more”); break;
Case ’10.15.1.158’: buffer[limitbypc] = fputs(data); break;?????????
If(sizeof(data)) == sizeof(buffer)
WriteString (“you can’t upload more”); break;
……………
Case’10.15.1.164’: ……….; break;

}
}
Return 0;}}

thanks
joseph