Using IE or FF for remote a PB Server EXE
Re: Using IE or FF for remote a PB Server EXE
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/
- Kwai chang caine
- 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
You have right, it's also that i say to me, in my head, the answer is in the source code of PHP 
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

And it's exactely why i have put this question on this forum and also on the french forum
Because, i know several members of you, have the knowledge that i dream to have a day
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 ..

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


And it's exactely why i have put this question on this forum and also on the french forum

Because, i know several members of you, have the knowledge that i dream to have a day

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 ..


Not a destination
Re: Using IE or FF for remote a PB Server EXE
But It's easy 
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
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

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

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
- Kwai chang caine
- 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
PureLeo thanks to your explanation 

Before i read you, i believe it's APACHE who send to PHP, and not PHP send to APACHE
When i say to you i know anything in WEB
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

Aaaah OK !!!! .... Me i believe it's the contraryApache gets the output from php, cgi, perl, purebasic, etc, and sends it to the client browser

Before i read you, i believe it's APACHE who send to PHP, and not PHP send to APACHE

When i say to you i know anything in WEB

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


Not a destination
Re: Using IE or FF for remote a PB Server EXE
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
)
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
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

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
Re: Using IE or FF for remote a PB Server EXE
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.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.
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.
YW RichRichAlgeni wrote:JackWebb: Great information! Thanks so much!
BTW: Do you find the copper clappers?

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

Make everything as simple as possible, but not simpler. ~Albert Einstein
Re: Using IE or FF for remote a PB Server EXE
Kwai,Kwaï chang caïne wrote:PureLeo thanks to your explanation
Aaaah OK !!!! .... Me i believe it's the contraryApache gets the output from php, cgi, perl, purebasic, etc, and sends it to the client browser
Before i read you, i believe it's APACHE who send to PHP, and not PHP send to APACHE
When i say to you i know anything in WEB
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
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?

Jack

Make everything as simple as possible, but not simpler. ~Albert Einstein
- Kwai chang caine
- 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
Yes it's nearly thatPureLeo 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)

In fact i don't know how exactely, because i know nothing at INTERNET langageJackWebb wrote:What exactly are you trying to do? Maybe someone will have an idea?

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

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

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

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

I know a program exist for crypting source code PHP, but how it do for do that ??? i don't know


Not a destination