php-windows Digest 12 Jul 2002 01:17:27 -0000 Issue 1236

Topics (messages 14711 through 14721):

Re: Calling Windows DLL Files
        14711 by: Todd Williamsen
        14714 by: Dash McElroy
        14718 by: Scott Hurring

XML with IIS
        14712 by: Johannes Hiemer

Re: XML parser file
        14713 by: Johannes Hiemer

Available PHP Whitepapers
        14715 by: R.S. Herhuth

Re: Formless post question
        14716 by: Ross Fleming

Misbehaving Headers
        14717 by: R.S. Herhuth
        14719 by: Christoph Grottolo

Re: File Upload
        14720 by: Alexandr Polupanov

Trouble with my session variables
        14721 by: Matias

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Luis,

That is fine and dandy for anybody, but this needs to be idiot proof;
meaning he has a bunch of girls maybe high school kids working there doing
this stuff and if the wrong information goes into the wrong patients files
he could get his ass in a sling legally.

You are right, re-writing a scanning program is the wrong way of doing it,
but there is a way to do an API call which would call the TWAIN32.dll file,
Photoshop does it, and most imaging applications do as well.  Now, being
able to tie in the scanning application with this application looks like the
easy part, the hard part is getting those newly scanned files in a folder
where they belong and being automatically tied into the patient's
information is the hard part.

I am thinking PHP isn't up to this task, and Visual Basic will be better
suited, damn I hate saying that!



"Luis Ferro" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> For a complex task as such, and without needing to "rewrite" the wheel
> (that means write a new scanning program) i would use:
>
> a) a scanner that works in a networked environment and as the ability to
> send the scannings to emails (i remmeber that the network scanners from
> HP can do it - even if they are a bit weird to configure...)
> b) create either a global mail drop box to send all scanned documents to
> it or create a mail box for each patient...
> c) write a much simpler pop3/imap program to handle the archiving needs
> with a web interface...
>
> For scanning, the good doctor would only need to go to the scanner,
> place the document and press a button... in the scanner
>
> For archiving, he would just go to the site and place the newly scanned
> documents in the patient file...
>
> Cheers,
> Luis Ferro
> TelaDigital
>
> P.S.- warning... the HP net scanners are weird to configure as they
> require a domain to "distribute" the scannings and have some limitations
> with regard of the ip network settings of the scanning server and the ip
> of the scanners by themselfs. They must reside in the same net mask...
> which in large distributed networks is a no-no... apart from that, they
> work very well...
>



--- End Message ---
--- Begin Message ---
I would think the only way to get the info automatically into the patient's
file is if you had some kind of seriously accurate OCR software that knew
where to look on the image and then used that for it's criteria of where to
go. Knowing that OCR is periodically unreliable... you won't want to do
that.

Realistically, _someone_ will have to tell the document where to go. You'll
also need to develop a process for auditing accuracy and other audits to
make sure that the info is in the right spot. Here's an idea:

1. The document needs some sort of identification, be it a cover page or a
sticky note in a strategic space
2. User scans document and tells it where to go (however you write this...)
and PHP puts it in that patient's database entry (assuming you're using a
database. You're using a database, right?).
3. At the end of the scanning, user audits their scanning to make sure all
is well
4. Periodically (i.e. weekly, monthly, whatever the doc decides), someone
does an audit to make sure that all the data is where it should be.

I've worked on a system like this, and while it was a bit of a pain
sometimes, the process is what makes the product usable. It _is_ a part of
the product.

Good luck (and don't say Visual Basic again :-> )

-Dash

-----Original Message-----
From: Todd Williamsen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 11, 2002 6:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Re: Calling Windows DLL Files


Luis,

That is fine and dandy for anybody, but this needs to be idiot proof;
meaning he has a bunch of girls maybe high school kids working there doing
this stuff and if the wrong information goes into the wrong patients files
he could get his ass in a sling legally.

You are right, re-writing a scanning program is the wrong way of doing it,
but there is a way to do an API call which would call the TWAIN32.dll file,
Photoshop does it, and most imaging applications do as well.  Now, being
able to tie in the scanning application with this application looks like the
easy part, the hard part is getting those newly scanned files in a folder
where they belong and being automatically tied into the patient's
information is the hard part.

I am thinking PHP isn't up to this task, and Visual Basic will be better
suited, damn I hate saying that!



"Luis Ferro" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> For a complex task as such, and without needing to "rewrite" the wheel
> (that means write a new scanning program) i would use:
>
> a) a scanner that works in a networked environment and as the ability to
> send the scannings to emails (i remmeber that the network scanners from
> HP can do it - even if they are a bit weird to configure...)
> b) create either a global mail drop box to send all scanned documents to
> it or create a mail box for each patient...
> c) write a much simpler pop3/imap program to handle the archiving needs
> with a web interface...
>
> For scanning, the good doctor would only need to go to the scanner,
> place the document and press a button... in the scanner
>
> For archiving, he would just go to the site and place the newly scanned
> documents in the patient file...
>
> Cheers,
> Luis Ferro
> TelaDigital
>
> P.S.- warning... the HP net scanners are weird to configure as they
> require a domain to "distribute" the scannings and have some limitations
> with regard of the ip network settings of the scanning server and the ip
> of the scanners by themselfs. They must reside in the same net mask...
> which in large distributed networks is a no-no... apart from that, they
> work very well...
>




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
As was said before, PHP cannot do anything on a different computer
than the script is running.  What might be the best option is to use
PHP for the web-enabled interface and database manipulation
and then create a simple VB/C++ microsoft GUI that would
simply scan the document in, upload it and fire up MSIE to the
webpage showing a list of "newly scanned documents".

Perhaps check out PHP-GTK for writing win32 GUI apps
with PHP.

--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
"Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Luis,
>
> That is fine and dandy for anybody, but this needs to be idiot proof;
> meaning he has a bunch of girls maybe high school kids working there doing
> this stuff and if the wrong information goes into the wrong patients files
> he could get his ass in a sling legally.
>
> You are right, re-writing a scanning program is the wrong way of doing it,
> but there is a way to do an API call which would call the TWAIN32.dll file,
> Photoshop does it, and most imaging applications do as well.  Now, being
> able to tie in the scanning application with this application looks like the
> easy part, the hard part is getting those newly scanned files in a folder
> where they belong and being automatically tied into the patient's
> information is the hard part.
>
> I am thinking PHP isn't up to this task, and Visual Basic will be better
> suited, damn I hate saying that!
>
>
>
> "Luis Ferro" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi there,
> >
> > For a complex task as such, and without needing to "rewrite" the wheel
> > (that means write a new scanning program) i would use:
> >
> > a) a scanner that works in a networked environment and as the ability to
> > send the scannings to emails (i remmeber that the network scanners from
> > HP can do it - even if they are a bit weird to configure...)
> > b) create either a global mail drop box to send all scanned documents to
> > it or create a mail box for each patient...
> > c) write a much simpler pop3/imap program to handle the archiving needs
> > with a web interface...
> >
> > For scanning, the good doctor would only need to go to the scanner,
> > place the document and press a button... in the scanner
> >
> > For archiving, he would just go to the site and place the newly scanned
> > documents in the patient file...
> >
> > Cheers,
> > Luis Ferro
> > TelaDigital
> >
> > P.S.- warning... the HP net scanners are weird to configure as they
> > require a domain to "distribute" the scannings and have some limitations
> > with regard of the ip network settings of the scanning server and the ip
> > of the scanners by themselfs. They must reside in the same net mask...
> > which in large distributed networks is a no-no... apart from that, they
> > work very well...
> >
>
>
>


--- End Message ---
--- Begin Message ---
Hi,
how can I get the XML-Functions working under win2k with IIS? Is there any
DLL? Or ist there any way to manage it without this functions?
Thx for help!

Ciao Johannes Hiemer


--- End Message ---
--- Begin Message ---

"Mathew Joseph" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi there,
>      does any one have copies of XMlparser.dll and xmltok.dll. these files
> seem to be missing on my comp. could someone send it across.
> thanks,
> Mathew
>

Hm I am searching for them too.



--- End Message ---
--- Begin Message ---

My CIO is impressed with what I have been accomplishing using PHP and is
considering updating a few of their aging ASP applications, but he needs
textual ammunition to present to the management committee to do so.  So
I was wondering if anyone knows of any technical whitepapers on PHP
geared towards management that I could give him to salivate over.

Thanks,
Ron
--- End Message ---
--- Begin Message ---
If I understand it, you COULD simply have a page with a form that points to
the CGI script, but you want to simulate this instead, correct?

If this is the case, you need to send that data as part of the HTTP headers
when requesting the page (instead of simply fputs-ing the GET / HTTP/1.1 or
whatever).  You can either extend the URI with the data (request the file
"cgi-bin/script?foo=bar&var=other") in other words, a simulation of <FORM
METHOD="GET">. fputs() something like:

GET /cgi-bin/script?foo=bar&var=other HTTP/1.1
(two \n's to end the headers)

The other option (simulating <FORM METHOD="POST"> is to make a POST request
to the server instead of a GET, followed by the data.  You'd fputs()
something like:

POST /cgi-bin/script HTTP/1.0
Content-type: application/x-www-form-urlencoded
Content-length: 200 (I think this just needs to be longer than all the data)
(blank line here)
foo=bar
var=other
(two \n's to end the headers)

I _think_ it sounds like you've already accomplished this.  The next step is
to read the data coming back from the cgi script and echo it to your php
output.  There are a few niggling things in my mind, such as a server
redirect possibly happening, so you would have to test the headers that came
back from the cgi script.  If it's a 200 OK message, then you can feel free
to just echo the html.  I think you could probably use fpassthru() or
something similar (although I think this is quite a resource hog for large
files, and you're probably best reading it line at a time
($reading=fread($socket_name, 4096); followed by an echo $reading; until the
end of the file).

Hope that helps!

Ross



-----Original Message-----
From: Rich Gray [mailto:[EMAIL PROTECTED]]
Sent: 11 July 2002 14:04
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Formless post question


I am doing a formless post to a CGI script on another site (PayPal). I am
doing this because the current site design has 2 different submit images on
a single form which need to post different data to the CGI script (after
registering the customer in the local database) dependent upon whcih image
gets clicked.

The PayPal CGI script has user interaction - the user has to login.

I am doing the formless post by using fsockopen() and fputs() to open the
http port and posting the data which seems to be working fine...and I
receive the raw http headers and html code when I read the open socket...
now for the $64m question - how can I emulate a normal form submit in
actually *loading* the page that is sent by the CGI script in the normal
fashion? If I don't read the data on the open socket then my script just
dies with no output...

Am I trying to do something very stupid here? :)

TIA
Rich


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---

I'm trying a trick I found on converting a report from generatated HTML
to an Excel spreadsheet.  Apparently there is a bug in MSIE that
requires that I use the following syntax to pass a link in order for the
headers to pick up on the fact that it is an Excel Spreadsheet that I'm after.

First page (test.html)


<excel_export.php/excel_export.xls">export to excel</a>



Second page (excel_export.php) in the same directory as test.html:

 
header("Content-Type:  application/vnd.ms-excel"); 
header("Expires: 0"); 
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 

include "DBinfo.php"; 

$connect = mssql_connect($host,$user,$pass) or die ($host." not
accessible."); 
if ($DB) mssql_select_db($DB)or die('USE '.$DB.' failed!'); 

$query = "SELECT last_name, first_name, nickname, division, title, id
FROM individual WHERE last_name LIKE'A%'"; 
$result = mssql_query($query); 
$numRows = mssql_num_rows($result); 

echo"<table>"; 
for($i=0; $i<$numRows; $i++){   
        echo "<tr>"; 
                $row = mssql_fetch_array($result); 
echo " 
<tr> 
<td valign='top' align='left'>$row[last_name]</td> 
<td valign='top' align='left'>$row[first_name]</td> 
<td valign='top' align='left'>$row[division]</td> 
<td valign='top' align='left'>$row[title]</td> 
</tr>"; 
} 
echo "</table>"; 

?>






The error I keep getting is:


page 1: 
<excel_export.php/excel_export.xls">export to excel</a> 

page 2: 

<? 
header("Content-Type:  application/vnd.ms-excel"); 
header("Expires: 0"); 
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 

include "DBinfo.php"; 

$connect = mssql_connect($host,$user,$pass) or die ($host." not
accessible."); 
if ($DB) mssql_select_db($DB)or die('USE '.$DB.' failed!'); 

$query = "SELECT last_name, first_name, nickname, division, title, id
FROM individual WHERE last_name LIKE'A%'"; 
$result = mssql_query($query); 
$numRows = mssql_num_rows($result); 

echo"<table>"; 
for($i=0; $i<$numRows; $i++){   
        echo "<tr>"; 
                $row = mssql_fetch_array($result); 
echo " 
<tr> 
<td valign='top' align='left'>$row[last_name]</td> 
<td valign='top' align='left'>$row[first_name]</td> 
<td valign='top' align='left'>$row[division]</td> 
<td valign='top' align='left'>$row[title]</td> 
</tr>"; 
} 
echo "</table>"; 

?> 


The error I keep getting is:

CGI Error 
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:



Am I doing something incorrectly?  

Ron
--- End Message ---
--- Begin Message ---
In www.php.net/header you'll find notes about IE misbehaving with headers.

Christoph

R.S. Herhuth wrote:

> I'm trying a trick I found on converting a report from generatated
> HTML to an Excel spreadsheet.  Apparently there is a bug in MSIE that
> requires that I use the following syntax to pass a link in order for
> the headers to pick up on the fact that it is an Excel Spreadsheet
> that I'm after. 
> 
> 
> Am I doing something incorrectly?
> 
> Ron

--- End Message ---
--- Begin Message ---
The file, which i'm uploading seems to appear in temp folder only when
upload is finished. So i can't track upload progress.
Help.


--- End Message ---
--- Begin Message ---
Hi there. I´m Matias from Argentina.
Here´s my problem.
I´m using latest php ver. under Win ME, w/ Apache
I can correctly start my sessions, register my variables, access them from another 
script than the one they are registered BUT when i "unregister" a variable or 
"destroy" a session an error message apears. It says that my path to php sessions is 
probably incorrect. But when i start the session for the first time it is well created 
in the right directory.
I would apreciate a lot if anyone could help me out.
Thanx.

                 Matías P. Pereyra
--- End Message ---

Reply via email to