[PHP] Re: Parsing an XML return from a POST

2007-01-08 Thread Fahad Pervaiz
===ORIGINAL=== Hi List I am working owards completing a rather urgent project for one of our clients. There is a requirement to send a request to a server and I now have that working using cURL, thanks to help from this list. I now have the responses coming back as an XML response. What I need to

Re: [PHP] Re: Sending file stored on server via email - How?

2007-01-08 Thread Matt Arnilo S. Baluyos (Mailing Lists)
On 1/8/07, Ville Mattila <[EMAIL PROTECTED]> wrote: Matt Arnilo S. Baluyos (Mailing Lists) kirjoitti: > What's the easiest way to go about this? Specifically, what's the > easiest way to read a file from the server and send it as an email > attachment. I would suggest you to use http://phpmailer

[PHP] Parsing an XML return from a POST

2007-01-08 Thread Richard Luckhurst
Hi List I am working owards completing a rather urgent project for one of our clients. There is a requirement to send a request to a server and I now have that working using cURL, thanks to help from this list. I now have the responses coming back as an XML response. What I need to do is to parse

Re: [PHP] Convert .txt or .doc to Javascript data format

2007-01-08 Thread Jochem Maas
Jade Tippett wrote: > New to php. > > I took over a web site where everything is written in javascript and > renders on the browser level. One of the pages is a weekly announcements > page that takes an hour to update by hand, copying in the text, then > escaping all the "'s etc., then adding

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Robert Cummings
On Tue, 2007-01-09 at 01:11 +0100, Jochem Maas wrote: > Robert Cummings wrote: > > On Mon, 2007-01-08 at 23:59 +0100, Jochem Maas wrote: > >> Bill Moran wrote: > >>> With reference to: > >>> http://bugs.php.net/bug.php?id=40067 > >>> > >>> I'm confused as to why this was marked bogus, and the messa

[PHP] Convert .txt or .doc to Javascript data format

2007-01-08 Thread Jade Tippett
New to php. I took over a web site where everything is written in javascript and renders on the browser level. One of the pages is a weekly announcements page that takes an hour to update by hand, copying in the text, then escaping all the "'s etc., then adding the tags for carriage return/

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Jochem Maas
Robert Cummings wrote: > On Mon, 2007-01-08 at 23:59 +0100, Jochem Maas wrote: >> Bill Moran wrote: >>> With reference to: >>> http://bugs.php.net/bug.php?id=40067 >>> >>> I'm confused as to why this was marked bogus, and the message that >>> marked as such doesn't give much insight. >>> >>> It wou

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Chris
Robert Cummings wrote: On Tue, 2007-01-09 at 10:01 +1100, Chris wrote: Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recur

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Robert Cummings
On Tue, 2007-01-09 at 10:01 +1100, Chris wrote: > Bill Moran wrote: > > With reference to: > > http://bugs.php.net/bug.php?id=40067 > > > > I'm confused as to why this was marked bogus, and the message that > > marked as such doesn't give much insight. > > > > It would seem to me that infinite re

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Robert Cummings
On Mon, 2007-01-08 at 23:59 +0100, Jochem Maas wrote: > Bill Moran wrote: > > With reference to: > > http://bugs.php.net/bug.php?id=40067 > > > > I'm confused as to why this was marked bogus, and the message that > > marked as such doesn't give much insight. > > > > It would seem to me that infin

Re: [PHP] Table contents not updated

2007-01-08 Thread Chris
Wikus Moller wrote: Hi. I am new to uising html forms with php and I am having a problem with database contents not being updated although it seems my coding is correct. Is it getting into the function? What is the exact database query that is being run? Does that return an error when you run

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Chris
Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion within PHP is a bug. Shouldn't the interpreter catch this sort of th

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Jochem Maas
Bill Moran wrote: > With reference to: > http://bugs.php.net/bug.php?id=40067 > > I'm confused as to why this was marked bogus, and the message that > marked as such doesn't give much insight. > > It would seem to me that infinite recursion within PHP is a bug. > Shouldn't the interpreter catch t

[PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Bill Moran
With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion within PHP is a bug. Shouldn't the interpreter catch this sort of thing before it cored

[PHP] Re: Table contents not updated

2007-01-08 Thread Wikus Moller
The function page IS included on every page so that wouldn't be what is causing the errors. On 1/8/07, Wikus Moller <[EMAIL PROTECTED]> wrote: Hi. I am new to uising html forms with php and I am having a problem with database contents not being updated although it seems my coding is correct. I

[PHP] Table contents not updated

2007-01-08 Thread Wikus Moller
Hi. I am new to uising html forms with php and I am having a problem with database contents not being updated although it seems my coding is correct. It's a xhtml formatted site with html forms: Here are my functions: Everything seems to be correct, but the table isn't updated... "; echo "

Re: [PHP] send email by php class

2007-01-08 Thread Jochem Maas
Sancar Saran wrote: > On Monday 08 January 2007 16:56, Jochem Maas wrote: >> [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: > Hi, >> ... >> > Was looking on phpclasses.net for the class but there are tons of them. > Can somebody recomend any class? Something simple. phpmail

Re: [PHP] send email by php class

2007-01-08 Thread Sancar Saran
On Monday 08 January 2007 16:56, Jochem Maas wrote: > [EMAIL PROTECTED] wrote: > >> [EMAIL PROTECTED] wrote: > >>> Hi, > > ... > > >>> Was looking on phpclasses.net for the class but there are tons of them. > >>> Can somebody recomend any class? Something simple. > >> > >> phpmailer.sourceforge.net

Re: [PHP] unpack on offsets in binary data in variable?

2007-01-08 Thread Robert Cummings
On Mon, 2007-01-08 at 16:20 +0100, Markus Fischer wrote: > Hi, > > I'm searching for an efficient way to use unpack on binary data within a > variable (php 5.1.something). In the past I was doing > > fopen > fseek > unpack( fread(...) > fseek > etc. > > Now this time I need to do the same, but I

Re: [PHP] send email by php class

2007-01-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: >> [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: > Hi, >> ... >> ... > > Jochem, > I'm reading most of the posted questions/answers on the mailing list > because of exact reason you mentioned. You're right. But, don't remember > any that can help me with thi

Re: [PHP] send email by php class

2007-01-08 Thread afan
> [EMAIL PROTECTED] wrote: >>> [EMAIL PROTECTED] wrote: Hi, > > ... > Was looking on phpclasses.net for the class but there are tons of them. Can somebody recomend any class? Something simple. >>> phpmailer.sourceforge.net >> I think this is it. >> :) > > not to sound like

[PHP] unpack on offsets in binary data in variable?

2007-01-08 Thread Markus Fischer
Hi, I'm searching for an efficient way to use unpack on binary data within a variable (php 5.1.something). In the past I was doing fopen fseek unpack( fread(...) fseek etc. Now this time I need to do the same, but I don't have an actual file: my data is only in a variable and I don't want to ope

Re: [PHP] send email by php class

2007-01-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: >> [EMAIL PROTECTED] wrote: >>> Hi, ... >>> >>> Was looking on phpclasses.net for the class but there are tons of them. >>> Can somebody recomend any class? Something simple. >> phpmailer.sourceforge.net > I think this is it. > :) not to sound like an ass (there's at lea

Re: [PHP] send email by php class

2007-01-08 Thread afan
> [EMAIL PROTECTED] wrote: >> Hi, >> To send email confirmation (after registration or to administrator after >> Contact us form is submitted) I use the "standard" way: >> >> function send_confirmation($to, $subject, $message) >> { >> $header = "Content-type: text/plain; charset=iso-8859-1\n";

Re: [PHP] send email by php class

2007-01-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: > Hi, > To send email confirmation (after registration or to administrator after > Contact us form is submitted) I use the "standard" way: > > function send_confirmation($to, $subject, $message) > { > $header = "Content-type: text/plain; charset=iso-8859-1\n"; > $

[PHP] send email by php class

2007-01-08 Thread afan
Hi, To send email confirmation (after registration or to administrator after Contact us form is submitted) I use the "standard" way: function send_confirmation($to, $subject, $message) { $header = "Content-type: text/plain; charset=iso-8859-1\n"; $header .= "From: Vernon Company <[EMAIL P

Re: [PHP] question about str_replace function

2007-01-08 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-08 11:35:06 +0100: >> Dick Jiang wrote: >>> I think you'd better use regular expression to replace the word >> agreed - only it a serious dive in the deep end of regexps - the OP may >> have to use a negative lookahead assertion, something lik

Re: [PHP] question about str_replace function

2007-01-08 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-08 11:35:06 +0100: > Dick Jiang wrote: > > I think you'd better use regular expression to replace the word > > agreed - only it a serious dive in the deep end of regexps - the OP may > have to use a negative lookahead assertion, something like: > > $string="avenue 1

Re: [PHP] computing 60/10 - how to?

2007-01-08 Thread Merlin
Merlin schrieb: Jochem Maas schrieb: Merlin wrote: Hi there, I do have a text value inside a variable: exif[FNumber] = 56/10 which I would like to save as a float value: 5,6 into a database. How can I compute this 56/10? I tried things like calculate() or math() but did not find the propper f

Re: [PHP] computing 60/10 - how to?

2007-01-08 Thread Merlin
Jochem Maas schrieb: Merlin wrote: Hi there, I do have a text value inside a variable: exif[FNumber] = 56/10 which I would like to save as a float value: 5,6 into a database. How can I compute this 56/10? I tried things like calculate() or math() but did not find the propper function to do thi

Re: [PHP] question about str_replace function

2007-01-08 Thread Jochem Maas
Dick Jiang wrote: > I think you'd better use regular expression to replace the word agreed - only it a serious dive in the deep end of regexps - the OP may have to use a negative lookahead assertion, something like: $string="avenue 1, ave 1 both have av+e :-)"; $words = preg_replace("#\\bave(?!n

RE: [PHP] computing 60/10 - how to?

2007-01-08 Thread Edward Kay
You could use exec() but that's not good practice due to the security implications. I'd extract the two numbers using explode() on the / and then just use the division operator. Edward > -Original Message- > From: Merlin [mailto:[EMAIL PROTECTED] > Sent: 08 January 2007 10:22 > To: php-g

Re: [PHP] computing 60/10 - how to?

2007-01-08 Thread Jochem Maas
Merlin wrote: > Hi there, > > I do have a text value inside a variable: exif[FNumber] = 56/10 which I > would like to save as a float value: 5,6 into a database. > > How can I compute this 56/10? I tried things like calculate() or math() > but did not find the propper function to do this. > > Ca

[PHP] computing 60/10 - how to?

2007-01-08 Thread Merlin
Hi there, I do have a text value inside a variable: exif[FNumber] = 56/10 which I would like to save as a float value: 5,6 into a database. How can I compute this 56/10? I tried things like calculate() or math() but did not find the propper function to do this. Can anybody help, please? Th

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-08 Thread Jochem Maas
Vincent DUPONT wrote: > hello, > if I can still contribute to this topic, I suggest you never use simlinks. > We experienced very bad maintenance problems at a customer : when copying new > files through FTP, the simlinks were often erased or overwriten. > And this occured on every upgrade of the

Re: [PHP] ODBC and long text fields

2007-01-08 Thread Jochem Maas
Larry Garfield wrote: > On Sunday 07 January 2007 8:26 pm, Jochem Maas wrote: > ... >> >> with regard to wanting results returned in a 'named' fashion, does the new >> setup still not allow use of odbc_fetch_array() instead of >> odbc_fetch_row()? not that I see any logic in that solving the iss

Re: [PHP] Windows directory listings

2007-01-08 Thread Jochem Maas
Beauford wrote: > ... >>> >>> >>> function searchdir ( $page , $maxdepth = -1 , $mode = >> "FILES" , $d = 0 ) { >>>if ( substr ( $page , strlen ( $page ) - 1 ) != '\\' ) { >> $page .= >>> '\\' ;} >> this if statement will run given the value of $page, it's not >> needed AFAIKT. >> then

RE: [PHP] question about str_replace function

2007-01-08 Thread Dick Jiang
I think you'd better use regular expression to replace the word Regards, Dick -Original Message- From: Kencana [mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 5:12 PM To: php-general@lists.php.net Subject: [PHP] question about str_replace function Hi all, I got a doubt about

[PHP] Re: question about str_replace function

2007-01-08 Thread M.Sokolewicz
change it to Kencana wrote: Hi all, I got a doubt about the str_replace function. $string="avenue 1, ave 1"; $words=str_replace ("ave","avenue", $string); echo $words; ?> the php code above will return me "avenuenue 1, avenue 1". i expect the result will be "avenue 1, avenue 1". any idea of

[PHP] question about str_replace function

2007-01-08 Thread Kencana
Hi all, I got a doubt about the str_replace function. the php code above will return me "avenuenue 1, avenue 1". i expect the result will be "avenue 1, avenue 1". any idea of how can i get such result? Thank you Regards, Kencana -- View this message in context: http://www.nabble.com/quest

Re: [PHP] Arrays?

2007-01-08 Thread Sumeet
Nicholas Yim wrote: > Hello William Stokes, > > 1 write a callback function: > [php] > function cmp_forth_value($left,$right){ > return $left[4]<$right?-1:($left[4]==$right[4]?0:1); return $left[4]<$right[4]?-1:($left[4]==$right[4]?0:1); ^^^ add th

Re: [PHP] Arrays?

2007-01-08 Thread Sumeet
Nicholas Yim wrote: > Hello William Stokes, > > 1 write a callback function: > [php] > function cmp_forth_value($left,$right){ > return $left[4]<$right?-1:($left[4]==$right[4]?0:1); return $left[4]<$right[4]?-1:($left[4]==$right[4]?0:1); ^^^ add th

[PHP] Re: Sending file stored on server via email - How?

2007-01-08 Thread Ville Mattila
Matt Arnilo S. Baluyos (Mailing Lists) kirjoitti: What's the easiest way to go about this? Specifically, what's the easiest way to read a file from the server and send it as an email attachment. I would suggest you to use http://phpmailer.sourceforge.net/ that is a featured class for sending e

Re: [PHP] Sending file stored on server via email - How?

2007-01-08 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-08 19:06:16 +1100: > Hello everyone, > > I store files on the server (.pdf, .doc, .txt, etc.) which are > referenced by entries in a database. The filenames are only stored in > the database and are not BLOBs. > > What I'd like to do is to be able to show a web form

[PHP] Sending file stored on server via email - How?

2007-01-08 Thread Matt Arnilo S. Baluyos (Mailing Lists)
Hello everyone, I store files on the server (.pdf, .doc, .txt, etc.) which are referenced by entries in a database. The filenames are only stored in the database and are not BLOBs. What I'd like to do is to be able to show a web form wherein a user can choose stored documents on the server and s