Using IE or FF for remote a PB Server EXE

Just starting out? Need help? Post your questions and find answers here.
User avatar
PureLeo
Enthusiast
Enthusiast
Posts: 221
Joined: Fri Jan 29, 2010 1:05 pm
Location: Brazil

Re: Using IE or FF for remote a PB Server EXE

Post by PureLeo »

Kcc, php doesn't work only with apache, it may work also with microsoft IIS and others http servers, so maybe you can only have an answer looking at PHP source :S http://snaps.php.net/
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Using IE or FF for remote a PB Server EXE

Post by Kwai chang caine »

You have right, it's also that i say to me, in my head, the answer is in the source code of PHP :D

I have the idea
I have the envy
I have the need
I have a PC
I have Windows
I have APACHE
I have PHP
I have the super language PB
I have the source code of PHP

But i have just a little problem ....i'm a mule :mrgreen:

Image

And it's exactely why i have put this question on this forum and also on the french forum :oops:
Because, i know several members of you, have the knowledge that i dream to have a day 8)
And i say to me that perhaps a member with big knowledge ask to him the same questions ....

How using APACHE with PB ????
or
How making a little PHP in PB ???
or
How catching the HTML code from APACHE ???

But i'm sure you ask to you, why create this style of program
For create a crypting page for exampler, or for create our personnal language PHP for exampler two...etc .. :D
ImageThe happiness is a road...
Not a destination
User avatar
PureLeo
Enthusiast
Enthusiast
Posts: 221
Joined: Fri Jan 29, 2010 1:05 pm
Location: Brazil

Re: Using IE or FF for remote a PB Server EXE

Post by PureLeo »

But It's easy :D
You don't need to know how it works behind everything... just use PB executable like a CGI script, the way CALC.CGI is doing in the beginning of this thread, then you can make webpages and everything with PB :D

How using APACHE with PB ????
-> CALC.cgi
How making a little PHP in PB ???
if you mean run a pb script like php, then it's what CALC.cgi does...
How catching the HTML code from APACHE ???
Apache gets the output from php, cgi, perl, purebasic, etc, and sends it to the client browser, i can't see an use for catching the html after that
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Using IE or FF for remote a PB Server EXE

Post by Kwai chang caine »

PureLeo thanks to your explanation 8)
Apache gets the output from php, cgi, perl, purebasic, etc, and sends it to the client browser
Aaaah OK !!!! .... Me i believe it's the contrary :oops:
Before i read you, i believe it's APACHE who send to PHP, and not PHP send to APACHE :oops:
When i say to you i know anything in WEB :oops:

I can also create a server in PB, like another member say to me, on another canal of 80, and perhaps sending an encrypted text to pb server for remote it, with a navigator like IE or FF :D
ImageThe happiness is a road...
Not a destination
User avatar
PureLeo
Enthusiast
Enthusiast
Posts: 221
Joined: Fri Jan 29, 2010 1:05 pm
Location: Brazil

Re: Using IE or FF for remote a PB Server EXE

Post by PureLeo »

Maybe I understand what you are trying to do now
Just didn't understand how could you use another "channel" in the port 80 :S

You can set up a pb server on port 80 and use your browser to send messages to it, and load html from your own server, or even exe like cgi pages (made also in purebasic :D)

But here in my country the internet provider blocks port 80, so if we wanna make something like that we need to chose another port
User avatar
JackWebb
Enthusiast
Enthusiast
Posts: 109
Joined: Wed Dec 16, 2009 1:42 pm
Location: Tampa Florida

Re: Using IE or FF for remote a PB Server EXE

Post by JackWebb »

whertz wrote:Would any web hosting companies allow the use of an exe file as cgi? I have a good idea for a website using a pb exe for the cgi, but like freepurebasic says, 10000 people using the website is going to kill your server.
Probably not, they are affraid of viruses and runaway programs (loop forever) shutting down the server. Running an exe is mostly an option for a home server or self serve. As far as CPU usage is concerned, mostly there is a usage spike from startup code. FastCGI aims to prevent this by keeping the program alive even when not in use. This prevents the startup code spike. After the spike, the cpu usage goes down to almost 0 depending on your program. You can even watch this behavior in your task manager.

I've often thought that a good way to do this with an EXE is to write it as a servelet, an application with built in server functions to handle the I/O.. But I haven't tried that experiment yet as Abyss still does not have Reverse Proxy. Apache does however. I suppose I could just run it on another port and point to it, but there are other problems as well.. Namely HTTP itself is a stateless protocol, so how to keep the connection open?

Anyway... The more I learn about this stuff, the more I am convinced the whole internet needs to be scrapped and redone. I can hardly believe any of it works at all to be honest.. Back in the day I was the author of several BBS systems. And even though serial communications was a bit complex, at least it made sense.
RichAlgeni wrote:JackWebb: Great information! Thanks so much!

BTW: Do you find the copper clappers? :wink:
YW Rich :)

No it's been over 30 years and I never did find them. http://www.youtube.com/watch?v=gpVjW30I-YU

Just the facts,
Jack 8)
Make everything as simple as possible, but not simpler. ~Albert Einstein
User avatar
JackWebb
Enthusiast
Enthusiast
Posts: 109
Joined: Wed Dec 16, 2009 1:42 pm
Location: Tampa Florida

Re: Using IE or FF for remote a PB Server EXE

Post by JackWebb »

Kwaï chang caïne wrote:PureLeo thanks to your explanation 8)
Apache gets the output from php, cgi, perl, purebasic, etc, and sends it to the client browser
Aaaah OK !!!! .... Me i believe it's the contrary :oops:
Before i read you, i believe it's APACHE who send to PHP, and not PHP send to APACHE :oops:
When i say to you i know anything in WEB :oops:

I can also create a server in PB, like another member say to me, on another canal of 80, and perhaps sending an encrypted text to pb server for remote it, with a navigator like IE or FF :D
Kwai,

Apache or lets just say "webserver" is like an interpreter.. The webserver listens for a file request. Then it reads the disk file that was requested, lets say index.html or index.php or default.aspx and then it does whatever the code inside the file says. In the case of the calc program, it starts with CALC.HTML the code inside that file says <form method="get" action="/cgi/calc/calc.cgi"> this tells the webserver to execute a program called calc.cgi. The server then catches the output from calc.cgi and sends it back to the client.

What exactly are you trying to do? Maybe someone will have an idea? :D

Jack 8)
Make everything as simple as possible, but not simpler. ~Albert Einstein
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Using IE or FF for remote a PB Server EXE

Post by Kwai chang caine »

PureLeo wrote:Maybe I understand what you are trying to do now
Just didn't understand how could you use another "channel" in the port 80 :S
You can set up a pb server on port 80 and use your browser to send messages to it, and load html from your own server, or even exe like cgi pages (made also in purebasic :D)
Yes it's nearly that 8)
JackWebb wrote:What exactly are you trying to do? Maybe someone will have an idea?
In fact i don't know how exactely, because i know nothing at INTERNET langage :oops:

But i want to adding a PB.exe on my server.
The best it's the exe intercalated between APACHE and PHP, but i think APACHE have not this option :cry:

1/ The navigator send to APACHE a crypting page PHP
2/ APACHE see it's PHP because the extension is ".php" (I think is normal behaviour)
3/ and it's here the problem, the goal, is can decrypt the PHP crypting code, and after sending the PHP not crypting to PHP :D
4/ After the PHP send to APACHE like usually

Adding this style of EXE can do several things:
1/ Can crypting the PHP code, for protect of thief of code, who can access physicaly to the server, for attribute the code of other, to them :?
2/ Can crypting the PHP code, for also sending crypting order, most better than just a password, because it's all the page who crypting 8)
3/ And can adding personnal commands, furthermore the native PHP comand

And perhaps more advantage, that i don't know now, but i'm sure there are surely many other

The best way, i think, is if APACHE can detect it's for PB with for exampler an extension ".pbhp", and sending to my PB exe, but i'm not sure APACHE can do that.
Or intercept the dialog between PHP/APACHE but if it's a module, it's surely internal and not possible :cry:

I know a program exist for crypting source code PHP, but how it do for do that ??? i don't know :cry:
ImageThe happiness is a road...
Not a destination
Post Reply