Refresh the pgae!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Nik
Forum Contributor
Posts: 138
Joined: Wed Jan 29, 2003 6:02 pm
Location: Thessaloniki, Greece

Refresh the pgae!

Post by Nik »

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?
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

hey Nik, you'll find that 0% of people on these forums are going to download an exe file and open it on either their PC or Server.

Sorry, but there is too much malicous stuff on the net nowadays, we must be careful.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Maybe if you send us to a web page with some screen shots and give a good description of what the program does we'll be able to help better.

Mac
Nik
Forum Contributor
Posts: 138
Joined: Wed Jan 29, 2003 6:02 pm
Location: Thessaloniki, Greece

Post by Nik »

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! :)
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

I thought I answered all your questions on PHP Builder the other day.
Nik
Forum Contributor
Posts: 138
Joined: Wed Jan 29, 2003 6:02 pm
Location: Thessaloniki, Greece

Post by Nik »

well actually no, because i never asked this question before, so pls do!
Post Reply