Re: [PHP] PHP calling an ISAPI Extension

2007-06-22 Thread Tijnema
On 6/20/07, Tijnema [EMAIL PROTECTED] wrote: On 6/19/07, Dan [EMAIL PROTECTED] wrote: Whoops, it turned out just to be a line wrapping problem, it was putting an extra space in. I have it working now, but after every request I get back the returning header in my result to it looks like

Re: [PHP] PHP calling an ISAPI Extension

2007-06-22 Thread Tijnema
On 6/22/07, FrozenDice [EMAIL PROTECTED] wrote: I came up with a what I presume to be quicker way of doing this by knowing the format. Since the headers always have \r\n after each line, then a blank line before the content I made this little bit of code. $explodedResult =

Re: [PHP] PHP calling an ISAPI Extension

2007-06-22 Thread Tijnema
On 6/22/07, FrozenDice [EMAIL PROTECTED] wrote: What do you mean not all the data is sent at once? I'm doing a http request, the browser responds sending back the code for the page. I've never heard of it sending back multiple responses. Plus I'm controling what the server sends from the ISAPI

Re: [PHP] PHP calling an ISAPI Extension

2007-06-22 Thread FrozenDice
On 6/22/07, Tijnema [EMAIL PROTECTED] wrote: On 6/22/07, FrozenDice [EMAIL PROTECTED] wrote: What do you mean not all the data is sent at once? I'm doing a http request, the browser responds sending back the code for the page. I've never heard of it sending back multiple responses. Plus I'm

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Tijnema
On 6/19/07, Dan [EMAIL PROTECTED] wrote: I modified your code to work with what I'm doing and this is what I got: $post_data = name=wowlikes=true; $fp = fsockopen(localhost,8080); fwrite($fp,POST /Project1.dll HTTP/1.1\r\nHost: localhost\r\nContent-Length:

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Jochem Maas
Dan wrote: I've looked arround and I can't find any mention of ISAPI COM, it's a pretty low level way of making applications, it would be upto the ISAPI code to 'publish' a COM interface to its functionality. in php you merely start a COM session by creating a COM object that inits the

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Dan
Whoops, it turned out just to be a line wrapping problem, it was putting an extra space in. I have it working now, but after every request I get back the returning header in my result to it looks like this: HTTP/1.1 200 OK Content-Length: 184 Content-Type: text/html Server: Microsoft-IIS/7.0

Re: [PHP] PHP calling an ISAPI Extension

2007-06-20 Thread Tijnema
On 6/19/07, Dan [EMAIL PROTECTED] wrote: Whoops, it turned out just to be a line wrapping problem, it was putting an extra space in. I have it working now, but after every request I get back the returning header in my result to it looks like this: HTTP/1.1 200 OK Content-Length: 184

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Tijnema
On 6/19/07, Jim Lucas [EMAIL PROTECTED] wrote: Dan wrote: I wish I could, I can't count on the script being on a linux machine. I also can't expect people to rebuild PHP with the curl library just to use my script. Is there any other way to do a post to a page from a php function? -

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Jochem Maas
Dan wrote: For example, I could use function fsockopen but that seems like it would probably be pretty slow doing all that, and if there's a php function or small script that would be preferable over the 50/60 lines you would need to do it properly with fsockopen. with the caveat that it'll

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Jim Lucas
Tijnema wrote: On 6/19/07, Jim Lucas [EMAIL PROTECTED] wrote: Dan wrote: I wish I could, I can't count on the script being on a linux machine. I also can't expect people to rebuild PHP with the curl library just to use my script. Is there any other way to do a post to a page from a php

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
You meant imply, infer is when you draw a conclusion based on what one already knows. Imply on the other hand means something you expressed or stated indirectly. Sorry, that's just one thing I can't pass up correcting people on :(. Jim Lucas [EMAIL PROTECTED] wrote in message news:[EMAIL

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
Yes, the ISAPI would be on the same machine, sorry I didn't mention that earlier. I'll go take a look at COM. - Daniel Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dan wrote: For example, I could use function fsockopen but that seems like it would probably be

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
I've looked arround and I can't find any mention of ISAPI COM, it's a pretty low level way of making applications, you used to be able to install PHP itself as a COM application on IIS to do PHP stuff. Is there any sort of compatiblity list for com? - Daniel Jochem Maas [EMAIL PROTECTED]

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
I modified your code to work with what I'm doing and this is what I got: $post_data = name=wowlikes=true; $fp = fsockopen(localhost,8080); fwrite($fp,POST /Project1.dll HTTP/1.1\r\nHost: localhost\r\nContent-Length: .strlen($post_data).\r\n\r\n.$post_data); $result = fread($fp,102400); // Reads

[PHP] PHP calling an ISAPI Extension

2007-06-18 Thread Dan
I'm in need of a way to contact an ISAPI Extension from a PHP function. Does anyone know how I would be able to do this? Usually you would post a page to their URL/actionname. Can I do a POST from a PHP function without reloading the page, and get a result back? That's one tall order.

RE: [PHP] PHP calling an ISAPI Extension

2007-06-18 Thread Jay Blanchard
[snip] I'm in need of a way to contact an ISAPI Extension from a PHP function. Does anyone know how I would be able to do this? Usually you would post a page to their URL/actionname. Can I do a POST from a PHP function without reloading the page, and get a result back? That's one tall order.

Re: [PHP] PHP calling an ISAPI Extension

2007-06-18 Thread Dan
I would normaly do it with an AJAX call but I need to do a post from WITHIN a PHP function, so when it's doing php stuff ex. function something() { echo 'whatever'; $response = post some data to a ISAPI Extension eg. post to http://domain.com/scripts/app.dll return $response . other data; }

Re: [PHP] PHP calling an ISAPI Extension

2007-06-18 Thread Jim Lucas
Dan wrote: I would normaly do it with an AJAX call but I need to do a post from WITHIN a PHP function, so when it's doing php stuff ex. function something() { echo 'whatever'; $response = post some data to a ISAPI Extension eg. post to http://domain.com/scripts/app.dll return $response .

Re: [PHP] PHP calling an ISAPI Extension

2007-06-18 Thread Dan
For example, I could use function fsockopen but that seems like it would probably be pretty slow doing all that, and if there's a php function or small script that would be preferable over the 50/60 lines you would need to do it properly with fsockopen. - Daniel Jay Blanchard [EMAIL

Re: [PHP] PHP calling an ISAPI Extension

2007-06-18 Thread Dan
I wish I could, I can't count on the script being on a linux machine. I also can't expect people to rebuild PHP with the curl library just to use my script. Is there any other way to do a post to a page from a php function? - Daniel Jim Lucas [EMAIL PROTECTED] wrote in message news:[EMAIL

Re: [PHP] PHP calling an ISAPI Extension

2007-06-18 Thread Jim Lucas
Dan wrote: I wish I could, I can't count on the script being on a linux machine. I also can't expect people to rebuild PHP with the curl library just to use my script. Is there any other way to do a post to a page from a php function? - Daniel Jim Lucas [EMAIL PROTECTED] wrote in message