Pls go to http://www.nikolas.tk and download logreader.exe by clicking the button!
My question is that can the above program be written in php and work as exe is working. Can this be done to the browsers output?
Refresh the pgae!
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Well ok guys! u r right! that .exe would be anything! so iam giving u the c++ source from logreader.exe
#include <conio.h>
#include <iostream.h>
int main()
{
int i,flag=0;
char x,y,c,letter;
char *log;
char *arxeio="c:\\progra~1\\mirc\\logs\\";
FILE *stream;
cout << "Dose to log pou theleis na diavaseis => ";
cin >> log;
strcat(arxeio, log);
if(!(stream = fopen(arxeio, "r")))
{
textcolor(LIGHTCYAN);
cprintf("To %s den vrethike! Doste to log se morfi filename.log!", arxeio);
cout << '\7';
getch();
exit(0);
}
clrscr();
while(!feof(stream) && !(c==27))
{
textcolor(WHITE);
for (i=0; i<30000000; i++);
if (y=='\n')
{
cprintf("\r\n\r\n");
y='\t';
}
if (x!='\n') cprintf("%c", x);
else cprintf("\r\n");
while ((x=fgetc(stream))=='<')
{
x=fgetc(stream);
cprintf("\r\n");
if (flag++==0) letter=x;
if (x==letter)
{
textcolor(LIGHTGREEN);
cprintf("%c", '<');
cprintf("%c", x);
while ((y=x=fgetc(stream))!='\n')
{
cprintf("%c", x);
for (i=0; i<30000000; i++);
if (kbhit())
if (getch()==27)
{
cout << "\7\r\n\r\n ********** DIAKOPH KATOPIN AITHSEWS XRHSTH **********";
getch();
cout << "\7\r\n\r\n !!! Made by Skias !!!";
getch();
exit(0);
}
else getch();
}
}
else
{
textcolor(YELLOW);
cprintf("%c", '<');
cprintf("%c", x);
while ((y=x=fgetc(stream))!='\n')
{
cprintf("%c", x);
for (i=0; i<30000000; i++);
if (kbhit())
if (getch()==27)
{
cout << "\7\r\n\r\n ********** DIAKOPH KATOPIN AITHSEWS XRHSTH **********";
getch();
cout << "\7\r\n\r\n !!! Made by Skias !!!";
getch();
exit(0);
}
else getch();
}
}
}
}
if (feof(stream)) cout << "\7\r\n\r\n********** TELOS TOY LOG **********";
getch();
cout << "\7\r\n\r\n!!! Made by Skias !!!";
getch();
}
And my question is:
Can it be done with php script?
Now u can run it of course!
#include <conio.h>
#include <iostream.h>
int main()
{
int i,flag=0;
char x,y,c,letter;
char *log;
char *arxeio="c:\\progra~1\\mirc\\logs\\";
FILE *stream;
cout << "Dose to log pou theleis na diavaseis => ";
cin >> log;
strcat(arxeio, log);
if(!(stream = fopen(arxeio, "r")))
{
textcolor(LIGHTCYAN);
cprintf("To %s den vrethike! Doste to log se morfi filename.log!", arxeio);
cout << '\7';
getch();
exit(0);
}
clrscr();
while(!feof(stream) && !(c==27))
{
textcolor(WHITE);
for (i=0; i<30000000; i++);
if (y=='\n')
{
cprintf("\r\n\r\n");
y='\t';
}
if (x!='\n') cprintf("%c", x);
else cprintf("\r\n");
while ((x=fgetc(stream))=='<')
{
x=fgetc(stream);
cprintf("\r\n");
if (flag++==0) letter=x;
if (x==letter)
{
textcolor(LIGHTGREEN);
cprintf("%c", '<');
cprintf("%c", x);
while ((y=x=fgetc(stream))!='\n')
{
cprintf("%c", x);
for (i=0; i<30000000; i++);
if (kbhit())
if (getch()==27)
{
cout << "\7\r\n\r\n ********** DIAKOPH KATOPIN AITHSEWS XRHSTH **********";
getch();
cout << "\7\r\n\r\n !!! Made by Skias !!!";
getch();
exit(0);
}
else getch();
}
}
else
{
textcolor(YELLOW);
cprintf("%c", '<');
cprintf("%c", x);
while ((y=x=fgetc(stream))!='\n')
{
cprintf("%c", x);
for (i=0; i<30000000; i++);
if (kbhit())
if (getch()==27)
{
cout << "\7\r\n\r\n ********** DIAKOPH KATOPIN AITHSEWS XRHSTH **********";
getch();
cout << "\7\r\n\r\n !!! Made by Skias !!!";
getch();
exit(0);
}
else getch();
}
}
}
}
if (feof(stream)) cout << "\7\r\n\r\n********** TELOS TOY LOG **********";
getch();
cout << "\7\r\n\r\n!!! Made by Skias !!!";
getch();
}
And my question is:
Can it be done with php script?
Now u can run it of course!