hello,
i want read a txt file on the internet i.e (http://dhagames.my3gb.com/dhagc.txt)
i actually want that i am making a game zone which has subscription from internet and the below program opens the website for subscription and user enters his username and password he want to set for this gaming zone.and his username and password saves in above txt file and i want to read this txt file through c program.how to do that?please help.a piece of code will be good help.i dont want u to do this for me but please help.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
int main()
{
char* pass;
char* p="hello";
int i=0,x;
printf("You have to register First in order to use our Game zone");
printf("\nPress 1 to open our website\n");
scanf("%d",&x);
if (x==1)
{
system("start firefox.exe www.dhagames.my3gb.com/dha.html");
}
printf("Enter password and press ENTER.\n \n");
{
printf("Password: ");
scanf( "%s", pass);
if(strcmp ( pass, p ) == 0)
{
printf("Correct Password. \n \n");
i=10;
}
else
{
if(strcmp ( pass, "hint" ) == 0)
{
printf("Password Hint: Form of salutation. \n \n");
}
else
{
printf("Incorrect Password. \nType 'hint' for help. \n \n");
i++;
}
}
}
}