[PHP-WIN] PHP Editor

2001-01-13 Thread James Brash

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 Digest 13 Jan 2001 11:53:40 -0000 Issue 394

2001-01-13 Thread php-windows-digest-help


php-windows Digest 13 Jan 2001 11:53:40 - Issue 394

Topics (messages 4959 through 4965):

Re: problem with checkdate ()
4959 by: Asendorf, John
4960 by: Cynic

Re: Simple question that I can't find the answer to
4961 by: Daniel Beulshausen

gd under win98
4962 by: guy roggemans

DOM
4963 by: James Duncan
4964 by: Alain Samoun

PHP Editor
4965 by: James Brash

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]


--



sorry folks, fixed it already...  thanks anyway

-
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: Asendorf, John [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 12, 2001 4:22 PM
> To: Php-Windows (E-mail)
> Subject: [PHP-WIN] problem with checkdate ()
> 
> 
> I'm trying to check a date... the date is saved as dd-Mon-YY
> 
> the following code: 
> 
> $frmdatecheck = date ("j, n, Y", strtotime ( $FROMdate ) );
> 
> if ( !checkdate ( $frmdatecheck ) ) {  }
> 
> gives me the following error
> 
> Warning: Wrong parameter count for checkdate() in
> D:\root\cc\resolutions\res_search.php on line 621
> 
> checkdate is defined as
> int checkdate (int month, int day, int year)
> 
> any suggestions?
> 
> Thanks in advace,   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.
> 
> 
> -- 
> 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]
> 




what about this:

$frmdatecheck = date ("j/n/Y", strtotime ( $FROMdate ) );

if( ! checkdate( list( $j , $n , $y ) = explode( '/' , $frmdatecheck ) ) )

or rather:

if( ! call_user_func_array( 'checkdate' , explode( '/' , $frmdatecheck ) ) )

At 22:21 12.1. 2001, Asendorf, John wrote the following:
-- 
>I'm trying to check a date... the date is saved as dd-Mon-YY
>
>the following code: 
>
>$frmdatecheck = date ("j, n, Y", strtotime ( $FROMdate ) );
>
>if ( !checkdate ( $frmdatecheck ) ) {  }
>
>gives me the following error
>
>Warning: Wrong parameter count for checkdate() in
>D:\root\cc\resolutions\res_search.php on line 621
>
>checkdate is defined as
>int checkdate (int month, int day, int year)
>
>any suggestions?
>
>Thanks in advace,   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.
>
>
>-- 
>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]
--end of quote-- 




Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






At 15:26 12.01.2001 -0500, Asendorf, John wrote:
>I have a set of date selectors which then people can use to search between
>two dates.  Even though they say FROM and TO, people will undoubtedly put
>the dates in the wrong order on occassion.  If this happens (I've already
>got the IF statement), I want to be able to switch the two dates before the
>SQL is written instead of having it

hmm, not sure, maybe a temp variable is the best, but you could also do the 
following:

 (($from > $to) ? $to : $from), "to" => (($to < 
$from) ? $from : $to));
  echo $array["from"], " - ", $array["to"], "";

  /* 2 - maybe you're even getting an array as input
   
   
   */
  $array = array(0 => 14, 1 => 12);
  if($array[0] > $array[1]) $array = array_reverse($array);
  echo $array[0], " - ", $array[1], "";
?>

>die ("Hey idiot, go back and switch the dates you've entered

Re: [PHP-WIN] PHP Editor

2001-01-13 Thread Matt Anderson

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-WIN] Viewing PCL files

2001-01-13 Thread Emore, Emmanuel

Does anybody know of a way of viewing PCL files using PHP that will not cost
a lot of $$$? I am currently reviewing a product called call SwiftView but
it cost a lot of $$$.

Thanks

-- 
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-WIN] php + seagate crystal reports

2001-01-13 Thread Christoph Aigner

hello,

is it possible to create seagate reports with php?. is there any extension
avaliable, some kind of sdk?

regards

christoph aigner

--
Christoph Aigner, CTO
Alaris Informationsmanagement GmbH
Paltaufgasse 16 / A-1160 Wien
Tel: +43-1 486 34 45
Mobil: +43-676 84 98 94 10
http://www.alaris.at


-- 
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-WIN] RTF Files Library...

2001-01-13 Thread Andres Salazar


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]




Re: [PHP-WIN] Simple question that I can't find the answer to

2001-01-13 Thread Jan Walter

If you are working with numbers, which is perhaps not your case, you can use
this simple trick to swith values of $a and $b:

$a = $a + $b;
$b = $a - $b;
$a = $a - $b;
--
__

==

Jan Walter, called John
LERACH, s.r.o.
phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
on emergency call cell phone: +420-602-385 760
work e-mail mailto:[EMAIL PROTECTED]
private e-mail mailto:[EMAIL PROTECTED]
ICQ#: 28353428
__

==




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




Re: [PHP-WIN] DOM

2001-01-13 Thread Michael Stearne

Could you do something like:

myForm.myField.value=tablejames.firstChild.childNodes[1].childNodes[4].firstChild.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]




RE: [PHP-WIN] DOM

2001-01-13 Thread James Duncan

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]




RE: [PHP-WIN] DOM

2001-01-13 Thread Michael Stearne


On Saturday, January 13, 2001, at 12:20 PM, 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? 

Well by the time you are talking about PHP is out of the picture.  PHP can be used to 
generate a DOM but once its generated PHP (or any server side language) is out of the 
picture, it then goes to the client-side stuff like you said. You can use PHP's 
fopen() to grab the page and then add the form and hidden fields I was talking about.  
By doing this, you are setting up the page to be handled correctly by the Javascript 
code you inserted through PHP.

Michael

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




Re: [PHP-WIN] Simple question that I can't find the answer to

2001-01-13 Thread Sean Bright

Yeah, but you could run into overflow problems with large values of a
and b.

Sean

Jan Walter wrote:
> 
> If you are working with numbers, which is perhaps not your case, you can use
> this simple trick to swith values of $a and $b:
> 
> $a = $a + $b;
> $b = $a - $b;
> $a = $a - $b;
> --
> 
>__
> 
> 
>==
> 
> Jan Walter, called John
> LERACH, s.r.o.
> phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
> on emergency call cell phone: +420-602-385 760
> work e-mail mailto:[EMAIL PROTECTED]
> private e-mail mailto:[EMAIL PROTECTED]
> ICQ#: 28353428
> 
>__
> 
> 
>==
> 
> --
> 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]




RE: [PHP-WIN] DOM

2001-01-13 Thread James Duncan

But surely if I'm using fopen to insert a hidden form and fields I might as
well use fopen to extract the data from the HTML page in the first place? It
just seems so much easier to capture the #text node values from the DOM,
rather than using fopen to locate the same information!?!

Another idea would be to use my Javascript to capture the text node values
from the DOM and write it to a cookie file. The contents of the cookie file
could then by read by PHP to populate the database?

Thanks

James


-Original Message-
From: Michael Stearne [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2001 17:32
To: James Duncan
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM


On Saturday, January 13, 2001, at 12:20 PM, 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?

Well by the time you are talking about PHP is out of the picture.  PHP can
be used to generate a DOM but once its generated PHP (or any server side
language) is out of the picture, it then goes to the client-side stuff like
you said. You can use PHP's fopen() to grab the page and then add the form
and hidden fields I was talking about.  By doing this, you are setting up
the page to be handled correctly by the Javascript code you inserted through
PHP.

Michael

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




RE: [PHP-WIN] DOM

2001-01-13 Thread Michael Stearne

No, actually I think that using PHP to insert the FORM and then use Javascript to get 
the #text node values would be easier.  Parsing Table cells using RegExs is no fun.

Michael

On Saturday, January 13, 2001, at 01:06 PM, James Duncan wrote:

> But surely if I'm using fopen to insert a hidden form and fields I might as 
> well use fopen to extract the data from the HTML page in the first place? It 
> just seems so much easier to capture the #text node values from the DOM, 
> rather than using fopen to locate the same information!?! 
>  
> Another idea would be to use my Javascript to capture the text node values 
> from the DOM and write it to a cookie file. The contents of the cookie file 
> could then by read by PHP to populate the database? 
>  
> Thanks 
>  
> James 
>  
>  
> -Original Message- 
> From: Michael Stearne [mailto:[EMAIL PROTECTED]] 
> Sent: 13 January 2001 17:32 
> To: James Duncan 
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
> Subject: RE: [PHP-WIN] DOM 
>  
>  
> On Saturday, January 13, 2001, at 12:20 PM, 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? 
>  
> Well by the time you are talking about PHP is out of the picture.  PHP can 
> be used to generate a DOM but once its generated PHP (or any server side 
> language) is out of the picture, it then goes to the client-side stuff like 
> you said. You can use PHP's fopen() to grab the page and then add the form 
> and hidden fields I was talking about.  By doing this, you are setting up 
> the page to be handled correctly by the Javascript code you inserted through 
> PHP. 
>  
> Michael 
>  
> > 
> > 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 cont

[PHP-WIN] How to correctly handle textual form inputs for SQL inserts/updates?

2001-01-13 Thread Mike Flynn

Hey all,

I am curious how one accounts for all possible quirks that may result from
textual form inputs when inserting or updating the results into the database.

For instance, if a form has  and/or  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 tried using urlencode, which fixed some things, but didn't fix the
problems resulting from the quotes.  I tried stripslashes, which didn't
seem to fix everything, either.

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

Can anyone fill me in on what the proper string formatting function or
functions are to do this?

Thanks a lot!

-Mike Flynn


-- 
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-WIN] Dynamic pages

2001-01-13 Thread Dark

Hi all

Ok I was able to get a file upload script to work on my Win2k, IIS5, PHP 4
server but now rather then me creating a page in the directory where the
people put their uploads I want to have a index page or similar that would
contain the upload script along with generate a directory structure of the
folders and files below it automatically. so I do not have to go through
once a day and update the index page to reflect the new files uploaded.  is
it possible to do this in PHP? If so could someone point me in the right
direction I am new to learning PHP thanks.

Clay


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




RE: [PHP-WIN] DOM

2001-01-13 Thread James Duncan

Hi again,

Thanks for your help so far. I will explain what I'm trying to achieve. I
want to pull down a web page that contains share prices, extract those share
prices, and update a database with the new prices. What I want is a nice and
neat solution that runs like a service (i.e. I can stop and start it from a
web browser, change the update interval (how long it waits before it repeats
the process)), etc.

I know a little PHP and Javascript (what I've taught/learnt over the last
few weeks). The process I have so far (not implemented at all yet):

1) PHP script that pulls down the relevant web page to my server
2) Data extraction from HTML web page
3) Updating of database with data from step 2
4) Running step 1 again after a certain period of time

Step 2 is the most complex by far. I was hoping to use PHP to access the
#text value via DOM but obviously this isn't possible because the DOM
doesn't exist server-side but only after the HTML has been rendered
client-side. Like you say, I could create a form and hidden fields in the
HTML file and use Javascript to read the #text node values into the hidden
fields. Then trigger a POST operation, where I can read in all the values
but I don't like the sound of this because then I would have to have a
browser interacting with my PHP scripts!?! I'm trying to create a
self-contained "service" that doesn't have any external dependants.

Is there any other way of accomplishing this without involving a browser?
The only other way I can see is to use PHP to strip all HTML tags, leaving
just the text? I could then write PHP code to read in the remaining text,
etc.

What is the best way to accomplish this? Is there a PHP command that strips
all HTML tags (and Javascript, etc) from an HTML file? Example code would be
great ;)

Thanks

James


-Original Message-
From: Michael Stearne [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2001 18:40
To: James Duncan
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM

No, actually I think that using PHP to insert the FORM and then use
Javascript to get the #text node values would be easier.  Parsing Table
cells using RegExs is no fun.

Michael

On Saturday, January 13, 2001, at 01:06 PM, James Duncan wrote:

> But surely if I'm using fopen to insert a hidden form and fields I might
as
> well use fopen to extract the data from the HTML page in the first place?
It
> just seems so much easier to capture the #text node values from the DOM,
> rather than using fopen to locate the same information!?!
>
> Another idea would be to use my Javascript to capture the text node values
> from the DOM and write it to a cookie file. The contents of the cookie
file
> could then by read by PHP to populate the database?
>
> Thanks
>
> James
>
>
> -Original Message-
> From: Michael Stearne [mailto:[EMAIL PROTECTED]]
> Sent: 13 January 2001 17:32
> To: James Duncan
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] DOM
>
>
> On Saturday, January 13, 2001, at 12:20 PM, 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?
>
> Well by the time you are talking about PHP is out of the picture.  PHP can
> be used to generate a DOM but once its generated PHP (or any server side
> language) is out of the picture, it then goes to the client-side stuff
like
> you said. You can use PHP's fopen() to grab the page and then add the form
> and hidden fields I was talking about.  By doing this, you are setting up
> the page to be handled correctly by the Javascript code you inserted
through
> PHP.
>
> Michael
>
> >
> > 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 

RE: [PHP-WIN] DOM

2001-01-13 Thread Corn Vollney-R7019C

James,

If you are the owner of the dowloaded html page you could use WDDX. Check it
out at WDDX.org.

Voll

-Original Message-
From: James Duncan [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 13, 2001 8:11 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM


Hi again,

Thanks for your help so far. I will explain what I'm trying to achieve. I
want to pull down a web page that contains share prices, extract those share
prices, and update a database with the new prices. What I want is a nice and
neat solution that runs like a service (i.e. I can stop and start it from a
web browser, change the update interval (how long it waits before it repeats
the process)), etc.

I know a little PHP and Javascript (what I've taught/learnt over the last
few weeks). The process I have so far (not implemented at all yet):

1) PHP script that pulls down the relevant web page to my server
2) Data extraction from HTML web page
3) Updating of database with data from step 2
4) Running step 1 again after a certain period of time

Step 2 is the most complex by far. I was hoping to use PHP to access the
#text value via DOM but obviously this isn't possible because the DOM
doesn't exist server-side but only after the HTML has been rendered
client-side. Like you say, I could create a form and hidden fields in the
HTML file and use Javascript to read the #text node values into the hidden
fields. Then trigger a POST operation, where I can read in all the values
but I don't like the sound of this because then I would have to have a
browser interacting with my PHP scripts!?! I'm trying to create a
self-contained "service" that doesn't have any external dependants.

Is there any other way of accomplishing this without involving a browser?
The only other way I can see is to use PHP to strip all HTML tags, leaving
just the text? I could then write PHP code to read in the remaining text,
etc.

What is the best way to accomplish this? Is there a PHP command that strips
all HTML tags (and Javascript, etc) from an HTML file? Example code would be
great ;)

Thanks

James


-Original Message-
From: Michael Stearne [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2001 18:40
To: James Duncan
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM

No, actually I think that using PHP to insert the FORM and then use
Javascript to get the #text node values would be easier.  Parsing Table
cells using RegExs is no fun.

Michael

On Saturday, January 13, 2001, at 01:06 PM, James Duncan wrote:

> But surely if I'm using fopen to insert a hidden form and fields I might
as
> well use fopen to extract the data from the HTML page in the first place?
It
> just seems so much easier to capture the #text node values from the DOM,
> rather than using fopen to locate the same information!?!
>
> Another idea would be to use my Javascript to capture the text node values
> from the DOM and write it to a cookie file. The contents of the cookie
file
> could then by read by PHP to populate the database?
>
> Thanks
>
> James
>
>
> -Original Message-
> From: Michael Stearne [mailto:[EMAIL PROTECTED]]
> Sent: 13 January 2001 17:32
> To: James Duncan
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] DOM
>
>
> On Saturday, January 13, 2001, at 12:20 PM, 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?
>
> Well by the time you are talking about PHP is out of the picture.  PHP can
> be used to generate a DOM but once its generated PHP (or any server side
> language) is out of the picture, it then goes to the client-side stuff
like
> you said. You can use PHP's fopen() to grab the page and then add the form
> and hidden fields I was talking about.  By doing this, you are setting up
> the page to be handled correctly by the Javascript code you inserted
through
> PHP.
>
> Michael
>
> >
> > 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

RE: [PHP-WIN] DOM

2001-01-13 Thread Michael Stearne

Send a url that points to the page you want to strip the info from.  Or look into 
another service or site that may give you the quotes in a raw text format.  Also look 
into the http://www.php.net/manual/en/function.strip-tags.php function in PHP.

Michael

On Saturday, January 13, 2001, at 03:11 PM, James Duncan wrote:

> Hi again, 
>  
> Thanks for your help so far. I will explain what I'm trying to achieve. I 
> want to pull down a web page that contains share prices, extract those share 
> prices, and update a database with the new prices. What I want is a nice and 
> neat solution that runs like a service (i.e. I can stop and start it from a 
> web browser, change the update interval (how long it waits before it repeats 
> the process)), etc. 
>  
> I know a little PHP and Javascript (what I've taught/learnt over the last 
> few weeks). The process I have so far (not implemented at all yet): 
>  
> 1) PHP script that pulls down the relevant web page to my server 
> 2) Data extraction from HTML web page 
> 3) Updating of database with data from step 2 
> 4) Running step 1 again after a certain period of time 
>  
> Step 2 is the most complex by far. I was hoping to use PHP to access the 
> #text value via DOM but obviously this isn't possible because the DOM 
> doesn't exist server-side but only after the HTML has been rendered 
> client-side. Like you say, I could create a form and hidden fields in the 
> HTML file and use Javascript to read the #text node values into the hidden 
> fields. Then trigger a POST operation, where I can read in all the values 
> but I don't like the sound of this because then I would have to have a 
> browser interacting with my PHP scripts!?! I'm trying to create a 
> self-contained "service" that doesn't have any external dependants. 
>  
> Is there any other way of accomplishing this without involving a browser? 
> The only other way I can see is to use PHP to strip all HTML tags, leaving 
> just the text? I could then write PHP code to read in the remaining text, 
> etc. 
>  
> What is the best way to accomplish this? Is there a PHP command that strips 
> all HTML tags (and Javascript, etc) from an HTML file? Example code would be 
> great ;) 
>  
> Thanks 
>  
> James 
>  
>  
> -Original Message- 
> From: Michael Stearne [mailto:[EMAIL PROTECTED]] 
> Sent: 13 January 2001 18:40 
> To: James Duncan 
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
> Subject: RE: [PHP-WIN] DOM 
>  
> No, actually I think that using PHP to insert the FORM and then use 
> Javascript to get the #text node values would be easier.  Parsing Table 
> cells using RegExs is no fun. 
>  
> Michael 
>  
> On Saturday, January 13, 2001, at 01:06 PM, James Duncan wrote: 
>  
> > But surely if I'm using fopen to insert a hidden form and fields I might 
> as 
> > well use fopen to extract the data from the HTML page in the first place? 
> It 
> > just seems so much easier to capture the #text node values from the DOM, 
> > rather than using fopen to locate the same information!?! 
> > 
> > Another idea would be to use my Javascript to capture the text node values 
> > from the DOM and write it to a cookie file. The contents of the cookie 
> file 
> > could then by read by PHP to populate the database? 
> > 
> > Thanks 
> > 
> > James 
> > 
> > 
> > -Original Message- 
> > From: Michael Stearne [mailto:[EMAIL PROTECTED]] 
> > Sent: 13 January 2001 17:32 
> > To: James Duncan 
> > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
> > Subject: RE: [PHP-WIN] DOM 
> > 
> > 
> > On Saturday, January 13, 2001, at 12:20 PM, 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? 
> > 
> > Well by the time you are talking about PHP is out of the picture.  PHP can 
> > be used to generate a DOM but once its generated PHP (or any server side 
> > language) is out of the picture, it then goes to the client-side stuff 
> like 
> > you said. You can use PHP's fopen() to grab the page and then add the form 
> > and hidden fields I was talking about.  By doing this, you are setting up 
> > the page to be handled correctly by the Javascript code you inserted 
> through 
> > PHP. 
> > 
> > Michael 
> > 
> > > 
> > > Thanks 
> > > 
> > > James 
> > > 
> > > -Original Message- 
> > > From: Michael Stearne [mailto:[EMAIL PROTECTED]] 
> > > S

RE: [PHP-WIN] DOM

2001-01-13 Thread James Duncan

Interesting. WDDX doesn't solve my problem of grabbing the content because
the supplier only provides it in HTML form but once I have the data I can
use WDDX as another way of making the data available to the world. Thanks
for the info.

I don't suppose you know of a way to push WDDX data packets to clients? For
example, after I've updated a field (for example, an updated price) in my
central database I would like to push it out to all my WDDX enabled clients
(obviously only the ones connected to the net/my server at the time) - like
a server push. I'm assuming the only way is to do a client pull - get the
client to ask the server via a WDDX request if there is any new data since
the client's last request. If I do a client pull I will have all the clients
polling the server every minute or so asking for new data regardless if any
exists or not. This could cause serious overloading of the server, whereas a
server push would only occur when new data exists.

Any ideas?

Thanks

James


-Original Message-
From: Corn Vollney-R7019C [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2001 20:15
To: 'James Duncan'; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM

James,

If you are the owner of the dowloaded html page you could use WDDX. Check it
out at WDDX.org.

Voll

-Original Message-
From: James Duncan [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 13, 2001 8:11 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM


Hi again,

Thanks for your help so far. I will explain what I'm trying to achieve. I
want to pull down a web page that contains share prices, extract those share
prices, and update a database with the new prices. What I want is a nice and
neat solution that runs like a service (i.e. I can stop and start it from a
web browser, change the update interval (how long it waits before it repeats
the process)), etc.

I know a little PHP and Javascript (what I've taught/learnt over the last
few weeks). The process I have so far (not implemented at all yet):

1) PHP script that pulls down the relevant web page to my server
2) Data extraction from HTML web page
3) Updating of database with data from step 2
4) Running step 1 again after a certain period of time

Step 2 is the most complex by far. I was hoping to use PHP to access the
#text value via DOM but obviously this isn't possible because the DOM
doesn't exist server-side but only after the HTML has been rendered
client-side. Like you say, I could create a form and hidden fields in the
HTML file and use Javascript to read the #text node values into the hidden
fields. Then trigger a POST operation, where I can read in all the values
but I don't like the sound of this because then I would have to have a
browser interacting with my PHP scripts!?! I'm trying to create a
self-contained "service" that doesn't have any external dependants.

Is there any other way of accomplishing this without involving a browser?
The only other way I can see is to use PHP to strip all HTML tags, leaving
just the text? I could then write PHP code to read in the remaining text,
etc.

What is the best way to accomplish this? Is there a PHP command that strips
all HTML tags (and Javascript, etc) from an HTML file? Example code would be
great ;)

Thanks

James


-Original Message-
From: Michael Stearne [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2001 18:40
To: James Duncan
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM

No, actually I think that using PHP to insert the FORM and then use
Javascript to get the #text node values would be easier.  Parsing Table
cells using RegExs is no fun.

Michael

On Saturday, January 13, 2001, at 01:06 PM, James Duncan wrote:

> But surely if I'm using fopen to insert a hidden form and fields I might
as
> well use fopen to extract the data from the HTML page in the first place?
It
> just seems so much easier to capture the #text node values from the DOM,
> rather than using fopen to locate the same information!?!
>
> Another idea would be to use my Javascript to capture the text node values
> from the DOM and write it to a cookie file. The contents of the cookie
file
> could then by read by PHP to populate the database?
>
> Thanks
>
> James
>
>
> -Original Message-
> From: Michael Stearne [mailto:[EMAIL PROTECTED]]
> Sent: 13 January 2001 17:32
> To: James Duncan
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] DOM
>
>
> On Saturday, January 13, 2001, at 12:20 PM, 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
r

Re: [PHP-WIN] Simple question that I can't find the answer to

2001-01-13 Thread L Forrister

This doesn't directly address your question but it may be worth being aware of.  

Depending on which database you're using and how complex the query is and any 
resulting performance hit, you could try something like: 
  $sql = "select * from table_by_date 
  where date_field between $from_date and $to_date 
 or date_field between $to_date and $from_date"
  // the reverse order between condition may be illegal in some SQL dialects, but it's 
accepted by MySQL and postgreSQL

   
  $sql = "select * from table_by_date 
  where (date_field >= $from_date and date_field <= $to_date) 
 or (date_field >= $to_date and date_field <= $from_date)"
  // the less than/greater than alternative to between is acceptable in all SQL's... 
most SQL's just convert the between form to this any way...
In either case the same result is returned, since the reverse order condition(s) 
returns no rows and the proper order condition(s) returns the desired row set.  
~~LF

  - Original Message - 
  From: Asendorf, John 
  To: Daniel Beulshausen ; Asendorf, John ; Php-Windows (E-mail) 
  Sent: Friday, January 12, 2001 12:26 PM
  Subject: RE: [PHP-WIN] Simple question that I can't find the answer to


  I have a set of date selectors which then people can use to search between
  two dates.  Even though they say FROM and TO, people will undoubtedly put
  the dates in the wrong order on occassion.  If this happens (I've already
  got the IF statement), I want to be able to switch the two dates before the
  SQL is written instead of having it 

  die ("Hey idiot, go back and switch the dates you've entered");

  :)

  -
  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: Daniel Beulshausen [mailto:[EMAIL PROTECTED]]
  > Sent: Friday, January 12, 2001 3:29 PM
  > To: Asendorf, John; Php-Windows (E-mail)
  > Subject: Re: [PHP-WIN] Simple question that I can't find the answer to
  > 
  > 
  > At 14:19 12.01.2001 -0500, 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"
  > 
  > the question would be why you have to exchange the 
  > variablenames, maybe you 
  > can use variable variables $$ or  ${}.
  > i depends on what you want to do.
  > 
  > daniel
  > 
  > 
  > /*--
  > daniel beulshausen - [EMAIL PROTECTED]
  > using php on windows? http://www.php4win.de
  > 
  > 
  > -- 
  > 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]




Re: [PHP-WIN] Simple question that I can't find the answer to

2001-01-13 Thread L Forrister

All of these "tricks" to exchange the contents of two variables, while possessing a 
certain elegance, share one common defect.  They are tricky.  Days, weeks and months 
later they can and likely will be difficult to understand.  This kind of trickiness 
may have a place deep in the internals of a package such as PHP or an OS kernel, but 
in a routine to edit user inputs clarity is probably a more important virtue.  I 
suggest the best way to handle the situation originally posted would be something 
like: 

if $userFromDate > $userToDate {
$sqlFromDate = $userToDate;
$sqlToDate = $userFromDate;
}
else {
$sqlToDate = $userToDate;
$sqlFromDate = $userFromDate;
}

"Tricks" obviously do make interesting discussion topics though.  
~~LF

  - Original Message - 
  From: Sean Bright 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, January 13, 2001 10:01 AM
  Subject: Re: [PHP-WIN] Simple question that I can't find the answer to


  Yeah, but you could run into overflow problems with large values of a
  and b.

  Sean

  Jan Walter wrote:
  > 
  > If you are working with numbers, which is perhaps not your case, you can use
  > this simple trick to swith values of $a and $b:
  > 
  > $a = $a + $b;
  > $b = $a - $b;
  > $a = $a - $b;
  > --
  > 
__
  > 
  > 
==
  > 
  > Jan Walter, called John
  > LERACH, s.r.o.
  > phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
  > on emergency call cell phone: +420-602-385 760
  > work e-mail mailto:[EMAIL PROTECTED]
  > private e-mail mailto:[EMAIL PROTECTED]
  > ICQ#: 28353428
  > 
__
  > 
  > 
==
  > 
  > --
  > 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]




Re: [PHP-WIN] Simple question that I can't find the answer to

2001-01-13 Thread L Forrister

All of these "tricks" to exchange the contents of two variables, while possessing a 
certain elegance, share one common defect.  They are tricky.  Days, weeks and months 
later they can and likely will be difficult to understand.  This kind of trickiness 
may have a place deep in the internals of a package such as PHP or an OS kernel, but 
in a routine to edit user inputs clarity is probably a more important virtue.  I 
suggest the best way to handle the situation originally posted would be something 
like: 

if $userFromDate > $userToDate {
$sqlFromDate = $userToDate;
$sqlToDate = $userFromDate;
}
else {
$sqlToDate = $userToDate;
$sqlFromDate = $userFromDate;
}

"Tricks" obviously do make interesting discussion topics though.  
~~LF

  - Original Message - 
  From: Sean Bright 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, January 13, 2001 10:01 AM
  Subject: Re: [PHP-WIN] Simple question that I can't find the answer to


  Yeah, but you could run into overflow problems with large values of a
  and b.

  Sean

  Jan Walter wrote:
  > 
  > If you are working with numbers, which is perhaps not your case, you can use
  > this simple trick to swith values of $a and $b:
  > 
  > $a = $a + $b;
  > $b = $a - $b;
  > $a = $a - $b;
  > --
  > 
__
  > 
  > 
==
  > 
  > Jan Walter, called John
  > LERACH, s.r.o.
  > phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
  > on emergency call cell phone: +420-602-385 760
  > work e-mail mailto:[EMAIL PROTECTED]
  > private e-mail mailto:[EMAIL PROTECTED]
  > ICQ#: 28353428
  > 
__
  > 
  > 
==
  > 
  > --
  > 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]




Re: [PHP-WIN] Simple question that I can't find the answer to

2001-01-13 Thread L Forrister

All of these "tricks" to exchange the contents of two variables, while possessing a 
certain elegance, share one common defect.  They are tricky.  Days, weeks and months 
later they can and likely will be difficult to understand.  This kind of trickiness 
may have a place deep in the internals of a package such as PHP or an OS kernel, but 
in a routine to edit user inputs clarity is probably a more important virtue.  I 
suggest the best way to handle the situation originally posted would be something 
like: 

if $userFromDate > $userToDate {
$sqlFromDate = $userToDate;
$sqlToDate = $userFromDate;
}
else {
$sqlToDate = $userToDate;
$sqlFromDate = $userFromDate;
}

"Tricks" obviously do make interesting discussion topics though.  
~~LF

  - Original Message - 
  From: Sean Bright 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, January 13, 2001 10:01 AM
  Subject: Re: [PHP-WIN] Simple question that I can't find the answer to


  Yeah, but you could run into overflow problems with large values of a
  and b.

  Sean

  Jan Walter wrote:
  > 
  > If you are working with numbers, which is perhaps not your case, you can use
  > this simple trick to swith values of $a and $b:
  > 
  > $a = $a + $b;
  > $b = $a - $b;
  > $a = $a - $b;
  > --
  > 
__
  > 
  > 
==
  > 
  > Jan Walter, called John
  > LERACH, s.r.o.
  > phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
  > on emergency call cell phone: +420-602-385 760
  > work e-mail mailto:[EMAIL PROTECTED]
  > private e-mail mailto:[EMAIL PROTECTED]
  > ICQ#: 28353428
  > 
__
  > 
  > 
==
  > 
  > --
  > 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]




Re: [PHP-WIN] Simple question that I can't find the answer to

2001-01-13 Thread L Forrister

Sorry for the multiple post.  Sometimes the mouse buttons on this lap top...
~~LF




RE: [PHP-WIN] DOM

2001-01-13 Thread Cynic

You don't understand the basic concept. 

DOM (Document Object Model) is a tree representing the structure 
of a document, where the elements (logically separated parts of) 
content is enclosed within tags to allow for computerized 
processing. IE exposes it's own version of DOM through its 
implementations of JS. If you want to access and manipulate a HTML 
document in PHP using this tree-like abstraction (DOM), you will 
have to use XML DOM library. No XML parser is an integral part of 
the language. 


At 18:20 13.1. 2001, James Duncan wrote the following:
-- 
>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]
--end of quote-- 




Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[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]




Re: [PHP-WIN] PHP Editor

2001-01-13 Thread Michael Cartmel

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]




RE: [PHP-WIN] DOM

2001-01-13 Thread James Duncan

Ah rite... thanks for the info. As I said I'm very new to all of this and
reading lots, whilst trying to make sense of it all ;) So it is possible to
use PHP to access DOM elements (via the XML DOM library) created from an
HTML source file (a code example would be very handy)? Does anyone know if
an XML parser will be built into PHP in the future? I then assume I could
access DOM elements from an HTML file in the same easy way as I can via
Javascript in IE?

Thanks

James


-Original Message-
From: Cynic [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2001 23:22
To: James Duncan; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM

You don't understand the basic concept.

DOM (Document Object Model) is a tree representing the structure
of a document, where the elements (logically separated parts of)
content is enclosed within tags to allow for computerized
processing. IE exposes it's own version of DOM through its
implementations of JS. If you want to access and manipulate a HTML
document in PHP using this tree-like abstraction (DOM), you will
have to use XML DOM library. No XML parser is an integral part of
the language.


At 18:20 13.1. 2001, James Duncan wrote the following:
--
>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].firs
t
>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.nod
e
>> Name);
>>   alert("Value is: " +
>>
>tablejames.firstChild.childNodes[1].childNodes[5].firstChild.firstChild.nod
e
>> 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]
--end of quote--




Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]


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

RE: [PHP-WIN] DOM

2001-01-13 Thread Cynic

I should warn you that XML functions require the document to be 
very 'correct'. Most (I guess 98%... I wish browsers weren't so 
forgiving, all might've been much easier and better) of HTML 
pages on the internet basically aren't HTML (which is a son of 
SGML, and an older, heavily cripled brother of XML), and even 
strict HTML isn't XML compliant up to XHTML 1.0, which is the 
latest version of HTML, fully XML compliant. 
If you'll try to load such document into an XML parser, it'll 
die with an error message, because XML requires the document 
to be well-formed.

At 00:54 14.1. 2001, James Duncan wrote the following:
-- 
>Ah rite... thanks for the info. As I said I'm very new to all of this and
>reading lots, whilst trying to make sense of it all ;) So it is possible to
>use PHP to access DOM elements (via the XML DOM library) created from an
>HTML source file (a code example would be very handy)? Does anyone know if
>an XML parser will be built into PHP in the future? I then assume I could
>access DOM elements from an HTML file in the same easy way as I can via
>Javascript in IE?
>
>Thanks
>
>James
>
>
>-Original Message-
>From: Cynic [mailto:[EMAIL PROTECTED]]
>Sent: 13 January 2001 23:22
>To: James Duncan; [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] DOM
>
>You don't understand the basic concept.
>
>DOM (Document Object Model) is a tree representing the structure
>of a document, where the elements (logically separated parts of)
>content is enclosed within tags to allow for computerized
>processing. IE exposes it's own version of DOM through its
>implementations of JS. If you want to access and manipulate a HTML
>document in PHP using this tree-like abstraction (DOM), you will
>have to use XML DOM library. No XML parser is an integral part of
>the language.
>
>
>At 18:20 13.1. 2001, James Duncan wrote the following:
>--
>>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].firs
>t
>>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.nod
>e
>>> Name);
>>>   alert("Value is: " +
>>>
>>tablejames.firstChild.childNodes[1].childNodes[5].firstChild.firstChild.nod
>e
>>> 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 Digest 14 Jan 2001 00:01:25 -0000 Issue 395

2001-01-13 Thread php-windows-digest-help


php-windows Digest 14 Jan 2001 00:01:25 - Issue 395

Topics (messages 4966 through 4991):

Re: PHP Editor
4966 by: Matt Anderson
4989 by: Michael Cartmel

Viewing PCL files
4967 by: Emore, Emmanuel

php + seagate crystal reports
4968 by: Christoph Aigner

RTF Files Library...
4969 by: Andres Salazar

Re: Simple question that I can't find the answer to
4970 by: Jan Walter
4974 by: Sean Bright
4983 by: L Forrister
4984 by: L Forrister
4985 by: L Forrister
4986 by: L Forrister
4987 by: L Forrister

Re: DOM
4971 by: Michael Stearne
4972 by: James Duncan
4973 by: Michael Stearne
4975 by: James Duncan
4976 by: Michael Stearne
4979 by: James Duncan
4980 by: Corn Vollney-R7019C
4981 by: Michael Stearne
4982 by: James Duncan
4988 by: Cynic
4990 by: James Duncan
4991 by: Cynic

How to correctly handle textual form inputs for SQL inserts/updates?
4977 by: Mike Flynn

Dynamic pages
4978 by: Dark

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]


--



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]





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





Does anybody know of a way of viewing PCL files using PHP that will not cost
a lot of $$$? I am currently reviewing a product called call SwiftView but
it cost a lot of $$$.

Thanks




hello,

is it possible to create seagate reports with php?. is there any extension
avaliable, some kind of sdk?

regards

christoph aigner

--
Christoph Aigner, CTO
Alaris Informationsmanagement GmbH
Paltaufgasse 16 / A-1160 Wien
Tel: +43-1 486 34 45
Mobil: +43-676 84 98 94 10
http://www.alaris.at






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





If you are working with numbers, which is perhaps not your case, you can use
this simple trick to swith values of $a and $b:

$a = $a + $b;
$b = $a - $b;
$a = $a - $b;
--
__

==

Jan Walter, called John
LERACH, s.r.o.
phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
on emergency call cell phone: +420-602-385 760
work e-mail mailto:[EMAIL PROTECTED]
private e-mail mailto:[EMAIL PROTECTED]
ICQ#: 28353428
__

==

RE: [PHP-WIN] DOM

2001-01-13 Thread James Duncan

Yikes. I'm just reading more about DOM and PHP at the moment on the
PHPBuilder website.

Does anyone have a version of PHP complied with DOM support included for
Windows (I'm developing on a Windows system before moving it over to Linux -
RedHat)?

So loading any old web page and trying to construct a DOM document from it
via PHP isn't going to work? How does IE v5 manage to parse the same web
page correctly (or what seems to be correctly)? I've already read in the DOM
table node elements #text and their values via Javascript in IE.

Still learning lots ;)

Thanks

James


-Original Message-
From: Cynic [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2001 00:07
To: James Duncan; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] DOM

I should warn you that XML functions require the document to be
very 'correct'. Most (I guess 98%... I wish browsers weren't so
forgiving, all might've been much easier and better) of HTML
pages on the internet basically aren't HTML (which is a son of
SGML, and an older, heavily cripled brother of XML), and even
strict HTML isn't XML compliant up to XHTML 1.0, which is the
latest version of HTML, fully XML compliant.
If you'll try to load such document into an XML parser, it'll
die with an error message, because XML requires the document
to be well-formed.

At 00:54 14.1. 2001, James Duncan wrote the following:
--
>Ah rite... thanks for the info. As I said I'm very new to all of this and
>reading lots, whilst trying to make sense of it all ;) So it is possible to
>use PHP to access DOM elements (via the XML DOM library) created from an
>HTML source file (a code example would be very handy)? Does anyone know if
>an XML parser will be built into PHP in the future? I then assume I could
>access DOM elements from an HTML file in the same easy way as I can via
>Javascript in IE?
>
>Thanks
>
>James
>
>
>-Original Message-
>From: Cynic [mailto:[EMAIL PROTECTED]]
>Sent: 13 January 2001 23:22
>To: James Duncan; [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] DOM
>
>You don't understand the basic concept.
>
>DOM (Document Object Model) is a tree representing the structure
>of a document, where the elements (logically separated parts of)
>content is enclosed within tags to allow for computerized
>processing. IE exposes it's own version of DOM through its
>implementations of JS. If you want to access and manipulate a HTML
>document in PHP using this tree-like abstraction (DOM), you will
>have to use XML DOM library. No XML parser is an integral part of
>the language.
>
>
>At 18:20 13.1. 2001, James Duncan wrote the following:
>--
>>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].fir
s
>t
>>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.no
d
>e
>>> Name);
>>>   alert("Value is: " +
>>>
>>tablejames.firstChild.childNodes[1].childNodes[5].firstChild.firstChild.no
d
>e
>>> 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. a

RE: [PHP-WIN] DOM

2001-01-13 Thread Cynic

It's not PHP vs. DOM. It's XML (DOM) vs. (bad) HTML. PHP just 
provides you with an interface to an XML parser.

www.php4win.de 


At 01:14 14.1. 2001, James Duncan wrote the following:
-- 
>Yikes. I'm just reading more about DOM and PHP at the moment on the
>PHPBuilder website.
>
>Does anyone have a version of PHP complied with DOM support included for
>Windows (I'm developing on a Windows system before moving it over to Linux -
>RedHat)?
>
>So loading any old web page and trying to construct a DOM document from it
>via PHP isn't going to work? How does IE v5 manage to parse the same web
>page correctly (or what seems to be correctly)? I've already read in the DOM
>table node elements #text and their values via Javascript in IE.
>
>Still learning lots ;)
>
>Thanks
>
>James
>
>
>-Original Message-
>From: Cynic [mailto:[EMAIL PROTECTED]]
>Sent: 14 January 2001 00:07
>To: James Duncan; [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] DOM
>
>I should warn you that XML functions require the document to be
>very 'correct'. Most (I guess 98%... I wish browsers weren't so
>forgiving, all might've been much easier and better) of HTML
>pages on the internet basically aren't HTML (which is a son of
>SGML, and an older, heavily cripled brother of XML), and even
>strict HTML isn't XML compliant up to XHTML 1.0, which is the
>latest version of HTML, fully XML compliant.
>If you'll try to load such document into an XML parser, it'll
>die with an error message, because XML requires the document
>to be well-formed.
>
>At 00:54 14.1. 2001, James Duncan wrote the following:
>--
>>Ah rite... thanks for the info. As I said I'm very new to all of this and
>>reading lots, whilst trying to make sense of it all ;) So it is possible to
>>use PHP to access DOM elements (via the XML DOM library) created from an
>>HTML source file (a code example would be very handy)? Does anyone know if
>>an XML parser will be built into PHP in the future? I then assume I could
>>access DOM elements from an HTML file in the same easy way as I can via
>>Javascript in IE?
>>
>>Thanks
>>
>>James
>>
>>
>>-Original Message-
>>From: Cynic [mailto:[EMAIL PROTECTED]]
>>Sent: 13 January 2001 23:22
>>To: James Duncan; [EMAIL PROTECTED]
>>Cc: [EMAIL PROTECTED]
>>Subject: RE: [PHP-WIN] DOM
>>
>>You don't understand the basic concept.
>>
>>DOM (Document Object Model) is a tree representing the structure
>>of a document, where the elements (logically separated parts of)
>>content is enclosed within tags to allow for computerized
>>processing. IE exposes it's own version of DOM through its
>>implementations of JS. If you want to access and manipulate a HTML
>>document in PHP using this tree-like abstraction (DOM), you will
>>have to use XML DOM library. No XML parser is an integral part of
>>the language.
>>
>>
>>At 18:20 13.1. 2001, James Duncan wrote the following:
>>--
>>>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].fir
>s
>>t
>>>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.no
>d
>>e
 Name);
   alert("Value is: " +

>>>table

[PHP-WIN] erro: The page cannot be displayed

2001-01-13 Thread Marq

Hi,

Installing Phorum, I have some pages running w/o problem, other simply
display an IE error message "The page cannot be displayed".  I assume I
changed something (actually I'm struggling with permission settings), so
that some pages cannot be displayed.

Where to look to fix the problems?

Thx for any help,
Marq.



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




Re: [PHP-WIN] PHP Editor

2001-01-13 Thread Romulo Roberto Pereira

HTML Kit is the best right now - Iam a homesite fan, but the new version is
too much resource eater... so I change to HTML Kit - It is freeware and has
a nice support for file transfers and make a FTP appears like a local
directory, making great for testing... Give it a try... www.htmlkit.com

Rom
- Original Message -
From: Michael Cartmel <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 13, 2001 6:43 PM
Subject: Re: [PHP-WIN] PHP Editor


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




RE: [PHP-WIN] Resize function jpeg/gif

2001-01-13 Thread Martin Verstegen

Found out:

The function "Imagecopyresized" is the answer. But what a pity, the provider
doesn't support gifs.




-Original Message-
From: 2FIT mverstegen [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 11:26 AM
To: Php-Windows-Help
Subject: [PHP-WIN] Resize function jpeg/gif

Hi,

I've seen that the GD extension provides functions to create and manipulate
images. I didn't find a function to resize an image. Is a resize possible
with PHP or do I have to call an external function?

Regards,
Martin Verstegen
2FIT


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




RE: [PHP-WIN] Resize function jpeg/gif

2001-01-13 Thread Rasmus Lerdorf

Get an older version of GD that does.  Or grab some of the retrofitted
versions that are floating around out there that support gif, jpg and png.

-Rasmus

On Sun, 14 Jan 2001, Martin Verstegen wrote:

> Found out:
>
> The function "Imagecopyresized" is the answer. But what a pity, the provider
> doesn't support gifs.
>
>
>
>
> -Original Message-
> From: 2FIT mverstegen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 12, 2001 11:26 AM
> To: Php-Windows-Help
> Subject: [PHP-WIN] Resize function jpeg/gif
>
> Hi,
>
> I've seen that the GD extension provides functions to create and manipulate
> images. I didn't find a function to resize an image. Is a resize possible
> with PHP or do I have to call an external function?
>
> Regards,
> Martin Verstegen
> 2FIT
>
>
> --
> 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-WIN] gd beginner blues

2001-01-13 Thread Paul Trapnell
Title: Blank



A newbie just needs a wee bit of gd guidance.  clicking a 
GD test fileprompts a "download" dialogue to pop up, or, on a second test 
files causeslines of "font" errors, then the infamous "header already sent" 
error, thenlines of character soup.the test file below, from John 
Lim at web.logs.com causes the windows"donwload file" dialogue to 
launch.  Gd and zlib both show as "enabled" onthe phpinfo page,  
yet this still happens. What could cause this? Anyone hasany 
ideas?Header( "Content-type: 
image/png";// create image$image = imagecreate(200,200);// 
create color R=100, G=0, R=0$maroon = 
ImageColorAllocate($image,100,0,0);// create color R=255, G=255, 
R=255$white = ImageColorAllocate($image,255,255,255);// create white 
backgroundImageFilledRectangle($image,0,0,200,200,$white);// create 
frameImageRectangle($image,10,10,190,190,$maroon);// create inner 
rectangleImageFilledRectangle($image,50,50,150,150,$maroon);// 
render imageImagePNG($image);// cleanup 
memoryImageDestroy($image);?>
 


Re: [PHP-WIN] DOM

2001-01-13 Thread Chris Adams

On 13 Jan 2001 14:22:24 -0800, James Duncan <[EMAIL PROTECTED]> wrote:
>the client's last request. If I do a client pull I will have all the clients
>polling the server every minute or so asking for new data regardless if any
>exists or not. This could cause serious overloading of the server, whereas a
>server push would only occur when new data exists.

Any way of doing that would be something of a major change in the way your 
application is written. Instead, have you considered caching that update? If 
you do it carefully (and maybe work in some sort of diff function so that a 
client can only retrieve changes from the previous update) you shouldn't have 
problems unless you have many thousands of clients on your network.

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