PROJECTS

1 Employee Database and Payroll Management

Developed and implemented an advanced Employee Database and Payroll Management System,using HTML, CSS, PHP and MySQL designed to streamline and automate crucial HR processes within the organization. This comprehensive solution effectively integrated essential functionalities, enhancing overall efficiency and accuracy in managing employee information and payroll administration.



Admin page login:




                                                                      Home page :


                                                         Department:



Employee:

Payements:


                                                                           Payslips:



                                                                            Set salary:


                                                                    Payment History:





2.File Transfer using TCP Socket in C

 My teammate and I worked on this project where the client reads a file and send its data to server.The server then receives the data and write it in a text file


Client

The client performs the following functions.

  1. Start the program
  2. Declare the variables and structures required.
  3. A socket is created and the connect function is executed.
  4. The file is opened.
  5. The data from the file is read and sent to the server.
  6. The socket is closed.
  7. The program is stopped.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>

int main(){

char *ip = "127.0.0.1";
int port = 5566;

int sock;
struct sockaddr_in addr;
socklen_t addr_size;
char buffer[1024];
int n;

sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0){
perror("[-]Socket error");
exit(1);
}
printf("[+]TCP server socket created.\n");

memset(&addr, '\0', sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = port;
addr.sin_addr.s_addr = inet_addr(ip);

connect(sock, (struct sockaddr*)&addr, sizeof(addr));
printf("Connected to the server.\n");

bzero(buffer, 1024);
strcpy(buffer, "HELLO, THIS IS CLIENT.");
printf("Client: %s\n", buffer);
send(sock, buffer, strlen(buffer), 0);

bzero(buffer, 1024);
recv(sock, buffer, sizeof(buffer), 0);
printf("Server: %s\n", buffer);

close(sock);
printf("Disconnected from the server.\n");

return 0;

}



Server

The server performs the following functions.

  1. Start the program.
  2. Declare the variables and structures required.
  3. The socket is created using the socket function.
  4. The socket is binded to the specific port.
  5. Start listening for the connections.
  6. Accept the connection from the client.
  7. Create a new file.
  8. Receives the data from the client.
  9. Write the data into the file.
  10. The program is stopped.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>

int main(){

char *ip = "127.0.0.1";
int port = 5566;

int server_sock, client_sock;
struct sockaddr_in server_addr, client_addr;
socklen_t addr_size;
char buffer[1024];
int n;

server_sock = socket(AF_INET, SOCK_STREAM, 0);
if (server_sock < 0){
perror("[-]Socket error");
exit(1);
}
printf("[+]TCP server socket created.\n");

memset(&server_addr, '\0', sizeof(server_addr));
server_addr.sin_family = AF_INET;
server_addr.sin_port = port;
server_addr.sin_addr.s_addr = inet_addr(ip);

n = bind(server_sock, (struct sockaddr*)&server_addr, sizeof(server_addr));
if (n < 0){
perror("[-]Bind error");
exit(1);
}
printf("[+]Bind to the port number: %d\n", port);

listen(server_sock, 5);
printf("Listening...\n");

while(1){
addr_size = sizeof(client_addr);
client_sock = accept(server_sock, (struct sockaddr*)&client_addr, &addr_size);
printf("[+]Client connected.\n");

bzero(buffer, 1024);
recv(client_sock, buffer, sizeof(buffer), 0);
printf("Client: %s\n", buffer);

bzero(buffer, 1024);
strcpy(buffer, "HI, THIS IS SERVER. HAVE A NICE DAY!!!");
printf("Server: %s\n", buffer);
send(client_sock, buffer, strlen(buffer), 0);

close(client_sock);
printf("[+]Client disconnected.\n\n");

}

return 0;
}




Output:connection establishing and transfer of file 





3.On road vehicle breakdown help assistance application

On Road Vehicle Breakdown Help Assistance goes to be an honest solution for the people who seek help within the remote locations with mechanical problems with their vehicle, using Java and XML in Android Studio.


Comments

Popular posts from this blog