PHP w/Webserver

Everything else that doesn't fall into one of the other PB categories.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

PHP w/Webserver

Post by Killswitch »

I've found some really useful things about using PHP with purebasic on the forums, and one of the best examples has to be PHPBrew. It seems to me that it's ok for simple scripts but what happens if a PHP script sends information to another PHP script via POST? How do you handle the parameters and pass them onto the php.exe?
~I see one problem with your reasoning: the fact is thats not a chicken~
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

This is a better description of what I want to do:

Hi,

One of my on going projects is a webserver called KNet, which some of you may have heard of. I'm in the process of writing version 2.0 and I want to include PHP support (something that was missing from 1.xx versions).

What I'm basically going to do is pass a PHP file to the PHP.exe, then save the output to a file, then use this as the page to send to the users browsers. That's pretty easy to do with simple PHP scripts, but for one's that have info posted to them through HTML forms its a bit more difficult.

Here's a header example:

Code: Select all

POST /welcome.php HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
Referer: http://81.154.106.152/
Accept-Language: en-gb
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2)
Host: 81.154.106.152
Content-Length: 17
Connection: Keep-Alive
Cache-Control: no-cache

name=Peter&age=15
So I need to pass the arguments 'name=Peter&age=15' to the PHP.exe along with welcome.php - how can I do this?
~I see one problem with your reasoning: the fact is thats not a chicken~
Post Reply