php-windows Digest 16 Jan 2001 19:50:10 -0000 Issue 400

Topics (messages 5035 through 5054):

Re: PHP Editor
        5035 by: Romulo Roberto Pereira
        5039 by: phobo
        5041 by: Asendorf, John
        5047 by: Lorant Toth
        5053 by: Alain Samoun

Re: How to correctly handle textual form inputs for SQL inserts/updates?
        5036 by: Romulo Roberto Pereira
        5049 by: Flint Doungchak

Apache & php problems
        5037 by: Arve Bersvendsen

Re: DOM
        5038 by: Tom

passing windows username to apache
        5040 by: Matt Williams
        5050 by: Chris Adams

Re: Simple question that I can't find the answer to
        5042 by: Asendorf, John

Re: RTF Files Library...
        5043 by: Asendorf, John

Apache crashes on exit with PHP 4.0.4+
        5044 by: Paulius Bulotas

Error with Sessions please help
        5045 by: Robert Trembath
        5046 by: Pavel Kalian

Installing under win9x/NT/2k - apache/mysql/php4
        5048 by: Romulo Roberto Pereira

Cannot build TSRM in Windows
        5051 by: Jaroslav Snajdr

What's up with Cookies on Windows
        5052 by: Joey Garcia
        5054 by: Joey Garcia

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]


----------------------------------------------------------------------


www.htmlkit.com is awesome and is FREEWARE
----- Original Message -----
From: Bikes <[EMAIL PROTECTED]>
To: 'Alain Samoun ' <[EMAIL PROTECTED]>; 'Angus Mann '
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 2:24 PM
Subject: RE: [PHP-WIN] PHP Editor


Is any of them FREE****

BIKES

-----Original Message-----
From: Alain Samoun
To: Angus Mann; [EMAIL PROTECTED]
Sent: 1/14/01 7:24 PM
Subject: Re: [PHP-WIN] PHP Editor

Ultraedit:
www.sonic.net/alain/ultraedit/

Alain
On Mon, Jan 15, 2001 at 02:17:40AM +1100, Angus Mann wrote:
> At 13:30 14/01/01 +0100, you wrote:
>
> Does anyone know of an editor that has good syntax colouring and also
can
> handle braces matching?
>
> Thanks,
>
> Angus.
>
> >Hi,
> >
> >I give my vote to Homesite, too. Very nice project management, and
CVS
> >integration using "Igloo". Great !
> >
> >""Michael Cartmel"" <[EMAIL PROTECTED]> a écrit dans le message
news:
> >001401c07dba$95577620$[EMAIL PROTECTED]
> > > HomeSite or ColdFusion Studio work great as well... plenty of
colour
> >coding
> > > etc...
> > >
> > > ----- Original Message -----
> > > From: "Matt Anderson" <[EMAIL PROTECTED]>
> > > To: "James Brash" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > > Sent: Sunday, January 14, 2001 12:28 AM
> > > Subject: Re: [PHP-WIN] PHP Editor
> > >
> > >
> > > > I personally use WinEdit 2000 for my Windows based PHP coding.
> > > Color-coded
> > > > language syntax and multiple editing tabs for files... check it
out
> > > anyway.
> > > > I'm not sure of the URL, but a search on Google or most likely
even
> >Tucows
> > > > would find it.
> > > >
> > > > Hope it helps!
> > > >
> > > > ----- Original Message -----
> > > > From: James Brash <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Saturday, January 13, 2001 10:54 PM
> > > > Subject: [PHP-WIN] PHP Editor
> > > >
> > > >
> > > > > Someone recently suggested a good PHP editor - similar to
notepad.
> >After
> > > > > reformatting, I lost the program and the url... anyone
remember it ?
> > > > Thanks
> > > > > if you can help
> > > > >
> > > > >
> > > > > --
> > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> >[EMAIL PROTECTED]
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> >
> >--
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






/me has used TextPad, its only problem is that it locks the files it opens
and some other programs can't even see the files (like i have to close the
program to be able to LeapFTP them).

Siggy

----- Original Message -----
From: "Michael Norum" <[EMAIL PROTECTED]>
To: "Kayhan Yüksel" <[EMAIL PROTECTED]>; "Bikes" <[EMAIL PROTECTED]>;
"'Alain Samoun '" <[EMAIL PROTECTED]>; "'Angus Mann '"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 10:09 AM
Subject: Re: [PHP-WIN] PHP Editor


You also have TextPad which is freeware...

michael
>
> yes, phpED is free
> ----- Original Message -----
> From: "Bikes" <[EMAIL PROTECTED]>
> To: "'Alain Samoun '" <[EMAIL PROTECTED]>; "'Angus Mann '"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, January 15, 2001 9:24 PM
> Subject: RE: [PHP-WIN] PHP Editor
>
>
> Is any of them FREE****
>
> BIKES
>
> -----Original Message-----
> From: Alain Samoun
> To: Angus Mann; [EMAIL PROTECTED]
> Sent: 1/14/01 7:24 PM
> Subject: Re: [PHP-WIN] PHP Editor
>
> Ultraedit:
> www.sonic.net/alain/ultraedit/
>
> Alain
> On Mon, Jan 15, 2001 at 02:17:40AM +1100, Angus Mann wrote:
> > At 13:30 14/01/01 +0100, you wrote:
> >
> > Does anyone know of an editor that has good syntax colouring and also
> can
> > handle braces matching?
> >
> > Thanks,
> >
> > Angus.
> >
> > >Hi,
> > >
> > >I give my vote to Homesite, too. Very nice project management, and
> CVS
> > >integration using "Igloo". Great !
> > >
> > >""Michael Cartmel"" <[EMAIL PROTECTED]> a écrit dans le message
> news:
> > >001401c07dba$95577620$[EMAIL PROTECTED]
> > > > HomeSite or ColdFusion Studio work great as well... plenty of
> colour
> > >coding
> > > > etc...
> > > >
> > > > ----- Original Message -----
> > > > From: "Matt Anderson" <[EMAIL PROTECTED]>
> > > > To: "James Brash" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> > > > Sent: Sunday, January 14, 2001 12:28 AM
> > > > Subject: Re: [PHP-WIN] PHP Editor
> > > >
> > > >
> > > > > I personally use WinEdit 2000 for my Windows based PHP coding.
> > > > Color-coded
> > > > > language syntax and multiple editing tabs for files... check it
> out
> > > > anyway.
> > > > > I'm not sure of the URL, but a search on Google or most likely
> even
> > >Tucows
> > > > > would find it.
> > > > >
> > > > > Hope it helps!
> > > > >
> > > > > ----- Original Message -----
> > > > > From: James Brash <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Saturday, January 13, 2001 10:54 PM
> > > > > Subject: [PHP-WIN] PHP Editor
> > > > >
> > > > >
> > > > > > Someone recently suggested a good PHP editor - similar to
> notepad.
> > >After
> > > > > > reformatting, I lost the program and the url... anyone
> remember it ?
> > > > > Thanks
> > > > > > if you can help
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > > > > To contact the list administrators, e-mail:
> > >[EMAIL PROTECTED]
> > > > >
> > > > >
> > > > > --
> > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > >
> > >
> > >
> > >--
> > >PHP Windows Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>



----------------------------------------------------------------------------
----


> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





My two cents include CoffeeCup HTML Editor (www.coffeecup.com) and PHPEd
(http://www.soysal.com/PHPEd/)

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631

The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.


> -----Original Message-----
> From: James Brash [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 6:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] PHP Editor
> 
> 
> Someone recently suggested a good PHP editor - similar to 
> notepad. After
> reformatting, I lost the program and the url... anyone 
> remember it ? Thanks
> if you can help
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Hi!

While you're talking about it ;) I wrote another PHP Editor that has some
neat features I needed. It is for windows and it's FREE, you can take a look
at the feature list at
http://phpcoder.stsoft.cjb.net/ .

I am working on some extensions you usually find in commercial PHP Editors,
like PHP Insight functions (yes, like the MS Visual C++ IntelliSense stuff,
but these will work with the standard funcs and your own classes and
functions as well ;) and "webserver integration" (the app will *translate*
local paths to http:// URLS if you have a local server, or ftp:// to http://
if it is remote), allows you to see your PHP code "in action" as it's parsed
by the server, not just a local PHP CGI.

Regards,
Lorant

----- Original Message -----
From: "Bikes" <[EMAIL PROTECTED]>
To: "'Alain Samoun '" <[EMAIL PROTECTED]>; "'Angus Mann '"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 8:24 PM
Subject: RE: [PHP-WIN] PHP Editor


Is any of them FREE****

BIKES

-----Original Message-----
From: Alain Samoun
To: Angus Mann; [EMAIL PROTECTED]
Sent: 1/14/01 7:24 PM
Subject: Re: [PHP-WIN] PHP Editor

Ultraedit:
www.sonic.net/alain/ultraedit/

Alain
On Mon, Jan 15, 2001 at 02:17:40AM +1100, Angus Mann wrote:
> At 13:30 14/01/01 +0100, you wrote:
>
> Does anyone know of an editor that has good syntax colouring and also
can
> handle braces matching?
>
> Thanks,
>
> Angus.
>
> >Hi,
> >
> >I give my vote to Homesite, too. Very nice project management, and
CVS
> >integration using "Igloo". Great !
> >
> >""Michael Cartmel"" <[EMAIL PROTECTED]> a écrit dans le message
news:
> >001401c07dba$95577620$[EMAIL PROTECTED]
> > > HomeSite or ColdFusion Studio work great as well... plenty of
colour
> >coding
> > > etc...
> > >
> > > ----- Original Message -----
> > > From: "Matt Anderson" <[EMAIL PROTECTED]>
> > > To: "James Brash" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > > Sent: Sunday, January 14, 2001 12:28 AM
> > > Subject: Re: [PHP-WIN] PHP Editor
> > >
> > >
> > > > I personally use WinEdit 2000 for my Windows based PHP coding.
> > > Color-coded
> > > > language syntax and multiple editing tabs for files... check it
out
> > > anyway.
> > > > I'm not sure of the URL, but a search on Google or most likely
even
> >Tucows
> > > > would find it.
> > > >
> > > > Hope it helps!
> > > >
> > > > ----- Original Message -----
> > > > From: James Brash <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Saturday, January 13, 2001 10:54 PM
> > > > Subject: [PHP-WIN] PHP Editor
> > > >
> > > >
> > > > > Someone recently suggested a good PHP editor - similar to
notepad.
> >After
> > > > > reformatting, I lost the program and the url... anyone
remember it ?
> > > > Thanks
> > > > > if you can help
> > > > >
> > > > >
> > > > > --
> > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> >[EMAIL PROTECTED]
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> >
> >--
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Yes, also do not miss the column mode, you can insert/fill columns, it has
been very useful to me for editing large scripts.

Alain
On Tue, Jan 16, 2001 at 05:09:21PM +1100, Angus Mann wrote:
> At 10:24 14/01/01 -0800, Alain Samoun wrote:
> >Ultraedit:
> >www.sonic.net/alain/ultraedit/
> 
> Thanks for that - I'd downloaded the evaluation and had completely missed 
> the braces matching feature in there :)
> 
> Angus.
> 
> >Alain
> >On Mon, Jan 15, 2001 at 02:17:40AM +1100, Angus Mann wrote:
> > > At 13:30 14/01/01 +0100, you wrote:
> > >
> > > Does anyone know of an editor that has good syntax colouring and also can
> > > handle braces matching?
> > >
> > > Thanks,
> > >
> > > Angus.




> For instance, if a form has <input type="text"> and/or <textarea> inputs,
> how do you treat the results of those inputs to safely insert them into
the
> database, to correct for 'single quotes, "double quotes, \slashes, etc etc
> etc.

I had the same problem - what I did to solve was use addslashes() in the
string before I send them to the database. This is working great for all the
user inputs - until now...

> So, in other words, I have a form with some inputs, named perhaps text1
and
text2.
> Then, when they submit the form, I want to insert or update that entry
with
those values, like..
> UPDATE tblStuff SET txtText1='".urlencode($text1)."',
> txtText2='".urlencode($text2)."'";
> or something like that..

UPDATE tblStuff SET txtText1='".addslashes($text1)."',
txtText2='".addslashes($text2)."'";

What do you think?

Rom





Hi,

I ended up using the setting the use_sybase_quotes in the php.ini file to
handle this problem.

-Flint

-----Original Message-----
From: Romulo Roberto Pereira [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 12:32 AM
To: [EMAIL PROTECTED]; Mike Flynn
Subject: Re: [PHP-WIN] How to correctly handle textual form inputs for
SQL inserts/updates?


> For instance, if a form has <input type="text"> and/or <textarea> inputs,
> how do you treat the results of those inputs to safely insert them into
the
> database, to correct for 'single quotes, "double quotes, \slashes, etc etc
> etc.

I had the same problem - what I did to solve was use addslashes() in the
string before I send them to the database. This is working great for all the
user inputs - until now...

> So, in other words, I have a form with some inputs, named perhaps text1
and
text2.
> Then, when they submit the form, I want to insert or update that entry
with
those values, like..
> UPDATE tblStuff SET txtText1='".urlencode($text1)."',
> txtText2='".urlencode($text2)."'";
> or something like that..

UPDATE tblStuff SET txtText1='".addslashes($text1)."',
txtText2='".addslashes($text2)."'";

What do you think?

Rom


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




There are actually 2 problems, I can't seem to solve on my own. On my
test server, running Win98, Apache 1.3.14 (r2), and PHP4.0.4p1, I have
tried 

If I install PHP, using script-alias, it works, for the most part, but
1) If I request a URL like this: http://foo/bar - it finds
http://foo/bar.php - why?
2) If I request a non-existent URL that shouldn't normally be handled
by PHP, I get the 404 error as expected. However, if I request a
non-existent URL that normally would be handled by PHP eg.
http://foo/nonexistent.php - I get an internal server error. An entry
is added to the Apache log: "Premature end of script headers". Is there
a workaround for this?


The other, more serious problem arises, when I try to install PHP as a
module. When I do that, error redirection works as expected, but my
Windows installation goes totally bananas:

Some applications will not start at all eg. Mozilla 0.7.
Launching of applications via context-sensitive menus will not work (I
have an editor attached to right-click menus, so I can open any file
easily in that editor). 

Further: No matter from what application  I try to launch other
applications via a context-sensitive menu, the host application freezes
until I shut down Apache. 

Has anyone else experienced any of this behavior?


For those interested; my httpd.conf is nothing out of the ordinary,
scriptaliased, the relevant parts of it are:

ScriptAlias /php4/ "D:/php/"
AddType application/x-httpd-php4 .php .php4 .php3 .phtml
Action application/x-httpd-php4 "/php4/php.exe"

and as a module:

LoadModule php4_module d:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .php4 .php3 .phtml






James

My guess is that whatever the site, the dat will be in a table.
It is fairly trivial to strip off everything before the beginning of the table
(replace everything up to and including <TABLE> with "")
Then replace (say) <tr> with </td> and </tr> with ""
Finally strip out the end of the file (</table> and onwards)

You will then just have the table data, all seperated by </td><td>, which should
be easy to handle (presumably you want to make a distinction between EPIC and
price - do this by using the datatype, and there'll probably be a pile of
formatting to sort out as well, but that should really be pretty trivial!)

Alternatively, you could spend a considerable amount of time trying to get a
generic XML parser to work and rebuild a DOM which would no doubt improve your
XML skills immeasurably, but you would probably die trying!

Tom

James Duncan wrote:

> Thanks Tom. Yes you have it exactly right. That is the approach I'm
> currently aiming for! However, as you say this approach is hard-coded to
> each source website. These websites have a nasty habit of changing their
> format slightly on a fairly regular basis. I'm also attempting to pull share
> price information from many different websites at the same time because none
> provide the full set of data I require plus some shares (off market
> particularly) are only provided on dedicated web sites.
>
> The reason I'm attempting to access the HTML textual data via the DOM is
> because I can run a looped search on all the #text fields until I find a
> match on a company name or EPIC code and then all data on the nested #text
> elements will be referring to that company. This allows easy data capture
> and transfer to my database. Another major benefit of this approach is that
> the same PHP code can be used to search ANY HTML file and recover the
> required data without source code changes. That's the idea but whether it's
> actually possible in reality is another matter ;)
>
> Thanks
>
> James
>
> -----Original Message-----
> From: Tom [mailto:[EMAIL PROTECTED]]
> Sent: 15 January 2001 10:31
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] DOM
>
> James
>
> If I'm reading your many posts right, then what you are trying to do is pull
> the
> share prices from the same site at (say) half hourly intervals, so that you
> can
> use them yourself / analyse them or whatever.
> In this case, I suspect that the format of the page you pull down will
> ALWAYS BE
> IDENTICAL, so you actually only have to work out a suitable parser to
> extract
> the data once.
> If I remember rightly from a couple of weeks back, you are using MySQL as
> the
> database? In this case, pull the html file down, save it on your server and
> examine how the html is constructed (it will almost certainly be an ASP /
> PHP
> while construct to build a table, all of whose rows will thus be identical
> apart
> from the data).
> Then you can use a command line (run from a PHP script if you like) MySQL
> LOAD DATA INFILE 'blah.html' INTO TABLE Share_Prices  FIELDS TERMINATED BY
> '</td><td>';
> type of construct.
> Note that you will want to strip out the beginning and end of the file first
> as
> well. This may sound like a bit of work, but you only have to do it once, as
> the
> file format will always be the same (barring the addition of new stocks).
>
> Tom
>
> James Duncan wrote:
>
> > I don't think this will work in my case because I don't control the layout
> > of the HTML page and hence can't add the hidden fields. I'm downloading
> the
> > HTML pages from a website. It would require as much work to insert the
> > hidden fields as trying to strip the HTML tags in an attempt to read the
> > data directly from the HTML page itself. There must be a way to access the
> > DOM directly from PHP? I notice in the manual there is a section regarding
> > XML DOM but not the DOM itself.
> >
> > Are the DOM values only available on the client? If that's the case then
> PHP
> > can't be used to read them because it's limited to the server side?
> >
> > Thanks
> >
> > James
> >
> > -----Original Message-----
> > From: Michael Stearne [mailto:[EMAIL PROTECTED]]
> > Sent: 13 January 2001 17:06
> > To: James Duncan
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] DOM
> >
> > Could you do something like:
> >
> >
> myForm.myField.value=tablejames.firstChild.childNodes[1].childNodes[4].first
> > Child.firstChild.node Value;
> >
> > Set up a form of hidden fields.  Extract the values from the DOM and then
> > have the user hit a Submit button to get to the next page.  At that point
> > the values that were collected and put into the hidden form fields will be
> > submitted and you next page (the PHP page) could INSERT the values into
> the
> > database,
> >
> > Michael
> >
> > On Friday, January 12, 2001, at 07:30 PM, James Duncan wrote:
> >
> > > Hi folks,
> > >
> > > I'm still new to HTML, Javascript and PHP but learning (fast hopefully).
> > > I've just started accessing DOM elements. I have worked out how to
> update
> > > the contents of table cells directly using this method, etc. In
> Javascript
> > I
> > > would use code like:
> > >
> > >   alert("Value is: " +
> > >
> >
> tablejames.firstChild.childNodes[1].childNodes[4].firstChild.firstChild.node
> > > Name);
> > >   alert("Value is: " +
> > >
> >
> tablejames.firstChild.childNodes[1].childNodes[5].firstChild.firstChild.node
> > > Value);
> > >
> > > This Javascript shows the name and value of the child element.
> > >
> > > Now I want to use PHP to extract data (values) from HTML pages like I do
> > > with the above Javascript. Is this possible? Obviously with the
> Javascript
> > > the HTML page has already been rendered in the browser (i.e. all tree
> > > elements have been created). This makes extracting data a simple case of
> > > finding the "#text" elements and reading in the values. Can I do the
> same
> > > thing with PHP and an HTML file I've downloaded from the Internet?
> > Obviously
> > > this file is sitting on my server and hasn't been rendered in a
> browser...
> > >
> > > The whole point of this exercise is so that I can extract values from an
> > > HTML table and populate them into a database. Maybe it's easier to
> process
> > > the HTML file line by line and strip the unwanted HTML tags? However,
> with
> > > this approach I've got to hardcode each webpage...
> > >
> > > If this is a silly question then sorry but you only learn if you ask ;)
> > >
> > > Thanks
> > >
> > > James
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





HI all

we're just considering setting up Apache/Linux for our intranet server. Is
there any way that we can get the users windows logon username available to
the scripts on the intranet machine.

TIA

M@





On 16 Jan 2001 03:57:10 -0800, Matt Williams <[EMAIL PROTECTED]> wrote:
>we're just considering setting up Apache/Linux for our intranet server. Is
>there any way that we can get the users windows logon username available to
>the scripts on the intranet machine.

If they're using IE, just enable HTTP basic authentication; IE should try to
automatically login with their windows login.




I guess I was just hoping some such thing existed and I was too stupid to
find it...

Obviously there are plenty of ways to DO it, I just thought I couldn't find
something that was obvious!  How happy I am to know that it just doesn't
exist  :)

It really had less to do with execution time or readability than with my
desire to know everything...

Thanks everyone for sending answers,

John 

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631

The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.


> -----Original Message-----
> From: Tom [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 5:14 AM
> To: Asendorf, John
> Cc: Php-Windows (E-mail)
> Subject: Re: [PHP-WIN] Simple question that I can't find the answer to
> 
> 
> Depends on why you want to lop it down to a single line? Is 
> this to make your
> code tidier, or to improve execution time (the latter I 
> doubt, as it won't
> take long to perform the code you describe!).
> The neat solution would obviously be  a function (maybe even 
> in javascript!)
> that takes the parameters date1 and date2 and does the following: -
> 
> if $date1 > $date2 {
>     $sql_date1 = $date1;
>     $sql_date2 = $date2;
>     }
> else {
>     $sql_date1 = $date2;
>     $sql_date2 = $date1;
>     }
> 
> "Asendorf, John" wrote:
> 
> > Is there a single line of code to do the following?
> >
> > I'm trying to interchange two variables' contents...  I can 
> do it with the
> > following, but I was just wondering...  I can't find it if 
> there is...
> >
> > $a = "abc";
> > $b = "def";
> >
> > $temp = $b;
> > $b = $a;
> > $a = $temp;
> >
> > //now $a = "def" and $b = "abc"
> >
> > Thanks in advance,
> >
> > John
> >
> > ---------------------
> > Founder of
> > The 'What Kind of Idiot Uses PHP with IIS with Oracle on 
> NT?' Consortium
> >
> > Members: John Asendorf, Thomas Kryger, Florian Clever, Ron 
> Woods, Bod
> >
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> >
> > Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur.
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Dear Andres,

You should be able to get good stuff from
http://www.logictran.com/RTF11405.htm

The specs are there and they produce an RTF to HTML and an HTML to RTF
converters.

John
---------------------
Founder of
The 'What Kind of Idiot Uses PHP with IIS with Oracle on NT?' Consortium

Members: John Asendorf, Thomas Kryger, Florian Clever, Ron Woods, Bod

John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631

Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur.


> -----Original Message-----
> From: Andres Salazar [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 10:32 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] RTF Files Library...
> 
> 
> 
> Hi,
> 
> Anyone knows where is a library to build RTF with PHP or 
> where I can get
> the RTF file format to build one on my own.
> 
> Thanx
> 
> Andres Salazar
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Hello,

using Apache 1.3.14 with PHP as module on WinNT 4.0 SP6.
Shutdowns well with 4.0.3pl1, but 4.0.4, 4.0.4pl1 and 4.0.5-dev crashes
every time referencing invalid memory (or smth like that).
Of course, no problem serving pages, but something is wrong.

Any ideas would be nice ;)

Regards,
Paulius





I have been using PHP4.04 on W2K with little or no problems using php.exe
instead of isapi. But when I try to initiate a session with

<?php
session_start();
?>

I get:

Warning: open(/tmp\sess_0baf96e5228010461d9116db56bb349b, O_RDWR) failed: m
(2) in c:\inetpub\wwwroot\DBTest.php on line 2
Successfully connected to MySQL
Successfully selected "Portal"

There are currently 2 users in the database.

      User Name User Type Last Login City
      Robert Trembath Shopper 6/30/2000 1:37:40 PM Houston
      Robert Trembath Realtor 6/30/2000 9:11:20 AM Houston

Warning: open(/tmp\sess_0baf96e5228010461d9116db56bb349b, O_RDWR) failed: m
(2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line 0


Thanks, Robert






Robert,
modify your session.save_path directive in PHP.INI to point to an existing
directory, for example c:\winnt\temp

Pavel

----- Original Message -----
From: "Robert Trembath" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 3:37 PM
Subject: [PHP-WIN] Error with Sessions please help


> I have been using PHP4.04 on W2K with little or no problems using php.exe
> instead of isapi. But when I try to initiate a session with
>
> <?php
> session_start();
> ?>
>
> I get:
>
> Warning: open(/tmp\sess_0baf96e5228010461d9116db56bb349b, O_RDWR) failed:
m
> (2) in c:\inetpub\wwwroot\DBTest.php on line 2
> Successfully connected to MySQL
> Successfully selected "Portal"
>
> There are currently 2 users in the database.
>
>       User Name User Type Last Login City
>       Robert Trembath Shopper 6/30/2000 1:37:40 PM Houston
>       Robert Trembath Realtor 6/30/2000 9:11:20 AM Houston
>
> Warning: open(/tmp\sess_0baf96e5228010461d9116db56bb349b, O_RDWR) failed:
m
> (2) in Unknown on line 0
>
> Warning: Failed to write session data (files). Please verify that the
> current setting of session.save_path is correct (/tmp) in Unknown on line
0
>
>
> Thanks, Robert
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I found this link and think that is useful:

http://www.firepages.com.au/phpdev.htm

Have fun,

Rom




Hello,

I want to build PHP 4.0.4pl1 in MSVC 6.0, following the build
instructions, but there is a problem with the TSRM module. When loading
the php4ts workspace, I get an error message box that says:

This makefile was not generated by Developer Studio.
Continuing will create a new Developer Studio project to wrap this
makefile.

So I continue, and everything builds except TSRM -- Visual Studio
probably doesn't know how to do it, as I get error message 'LINK : fatal
error LNK1104: cannot open file "TSRM.lib"'. Any ideas on what's
happening here? Thanks,

-jns





I'm really surprised how difficult it is to get cookies to work with PHP, I
can't seem to get it to work and I've read all these posts and other posts
elsewhere and everyone says the same thing IT MUST BE THE FIRST THING SENT.
I have tried everything, what am I doing wrong???


Any help would be much appreciated!!!!!


I get this error message for the code below.

Warning: Cannot add header information - headers already sent by (output
started at c:\program files\apache group\apache\htdocs\class\cookie.php:2)
in c:\program files\apache group\apache\htdocs\class\cookie.php on line 3


<?php
setcookie("myCookie","test",date("l, d-M-y H:i:s",
(mktime()+1800)),"/","",0);
?>

<html>
<head>
 <title>Set A Cookie</title>
</head>

<body>
<h1>Cookie Test</h1>

</body>
</html>







It Worked!!!  Boy, they aren't kidding when they are "IT MUST BE THE FIRST
THING SENT"!

Line 1 now looks like this <?php
setcookie("lmco","test",time()+10,"/","",0);?>


Thanks for your answer Andrian!


-----Original Message-----
From: Andrian Pervazov [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 12:33 PM
To: Joey Garcia
Subject: Re: [PHP-WIN] What's up with Cookies on Windows


make sure you don't have a blank space before the <? tag

Andrian

Joey Garcia wrote:
> I'm really surprised how difficult it is to get cookies to work with PHP,
I
> can't seem to get it to work and I've read all these posts and other posts
> elsewhere and everyone says the same thing IT MUST BE THE FIRST THING
SENT.
> I have tried everything, what am I doing wrong???
>
>
> Any help would be much appreciated!!!!!
>
>
> I get this error message for the code below.
>
> Warning: Cannot add header information - headers already sent by (output
> started at c:\program files\apache group\apache\htdocs\class\cookie.php:2)
> in c:\program files\apache group\apache\htdocs\class\cookie.php on line 3
>
>
> <?php
> setcookie("myCookie","test",date("l, d-M-y H:i:s",
> (mktime()+1800)),"/","",0);
> ?>
>
> <html>
> <head>
>  <title>Set A Cookie</title>
> </head>
>
> <body>
> <h1>Cookie Test</h1>
>
> </body>
> </html>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>




Reply via email to