Re: [PHP] please help with regular expression in preg_replace

2009-10-30 Thread Red
1stdom.com dom_sed = 1stdom.com p1_1 = com p1_2 = com p2_1 = 1stdom.com p2_2 = 1stdom.com and this is line which i need in roundcube setup: $rcmail_config['username_domain'] = preg_replace( '/^[^.]+\./' , '', $_SERVER['HTTP_HOST'] ) ; many thanks again Rene

[PHP] please help with regular expression in preg_replace

2009-10-29 Thread Red
hello, im not a php developer, i just need to rewrite one php file but having problem with understanding syntax of regexp in php. i need to get domain name from fqdn (for example from $_SERVER['HTTP_HOST'] ) in sed its working well with "s/[^.]*\.//" , but preg_replace behaves weird. http_hos

[PHP] Re: Custom Open Tags

2004-12-03 Thread Red Wingate
#x27;m using the regular expression to replace ÂÂ"\\$([a-zA-Z_][a-zA-Z0-9_]*)"Â with ÂÂ"\$GLOBALS[\"\\1\"]" to make sure all variables are found as we are within the function's scoope and not within the global one. Maybe this helps some ppl. -- red > The on

[PHP] Re: Display only one filed of the repeated records

2004-11-30 Thread Red Wingate
Hi Ahmed, hope this helps: $ary = array() ; $sql = "SELECT COUNT(*), category FROM movies GROUP BY category" ; $res = mysql_query ( $sql ) ; while ( $line = mysql_fetch_assoc ( $res ) ) { $ary[] = $line[ 'category' ] ; } echo implode ( " - " , $ary ) ; -

[PHP] Re: Globally accessible objects without using 'global $obj;'

2004-11-12 Thread Red Wingate
parts of my current project :-/ -- red Chris W. Parker wrote: Hello, Ok so I'm trying to write an error reporting class and I'm just sort of experimenting at this point (comments outside the scope of this email are welcome btw) with how to best implement it. One idea I had (which isn&#

[PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Red Wingate
Maybe you recheck the dokumentation on what exactly referenzes are. Do you expect the function to alter the string "something here" and every- time you later print the string within your script you get the altered one? ONLY variables can be passed by referenze ! -- red Daevid Vincent

[PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Red Wingate
Maybe you recheck the dokumentation on what exactly referenzes are. Do you expect the function to alter the string "something here" and every- time you later print the string within your script you get the altered one? ONLY variables can be passed by referenze ! -- red Daevid Vincent

Re: [PHP] How to tell if the file is already locked with flock()???

2004-07-15 Thread Red Wingate
http://de2.php.net/manual/en/function.is-writeable.php Jay Blanchard wrote: [snip] How do we tell if the file is already locked when someone use a flock() on the file?? [/snip] If your flock attempt returns FALSE then it is likely locked already -- PHP General Mailing List (http://www.php.net/)

[PHP] Re: Regular Expressions

2004-07-15 Thread Red Wingate
Oh guess it would be even better and faster to only use: /Last Name:([^\n]*)/ and trim() the result :-) -- red Red Wingate wrote: Yep, but to avoid his problem with empty Strings he should use something like: /Last Name: *(.*?)\n/ outerwise \s* will match the first newline and continue to the end

[PHP] Re: Regular Expressions

2004-07-15 Thread Red Wingate
Yep, but to avoid his problem with empty Strings he should use something like: /Last Name: *(.*?)\n/ outerwise \s* will match the first newline and continue to the end of the next line ! Tim Van Wassenhove wrote: In article <[EMAIL PROTECTED]>, Arik Raffael Funke wrote: implement following pattern

[PHP] Re: PHP5 release HTTP Authentication not working on FreeBSD.

2004-07-15 Thread Red Wingate
known problem, will be fixed soon in 5.0.1 which should be released asap William Bailey wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Guys, I've just upgraded from 5.0 rc3 to 5.0 release on freeBSD (using the ports) and now find that HTTP Authentication dosent work. Here is the te

[PHP] Re: ereg question/prob...

2004-07-15 Thread Red Wingate
$regs is an array not a string ! try print_r or var_dump to determine $regexp's content Tim Van Wassenhove wrote: In article <[EMAIL PROTECTED]>, Bruce wrote: $file = ".txt"; ereg("(\.)([a-z0-9]{3,5})$", $file, $regs); echo " ww = ".$regs. ""; i'm trying to figure out how to get the portion of

[PHP] Re: Compile Php5: --with-mysql and --with-mysqli

2004-07-14 Thread Red Wingate
[quote src="doc"] If you would like to install the mysql extension along with the mysqli extension you have to use the same client library to avoid any conflicts. [/quote] Jacob Friis Larsen wrote: > How do I install Php5 with both --with-mysql and --with-mysqli? > > MySQL is 4.1.3-beta and inst

[PHP] Re: warning: function registration failed

2004-07-12 Thread Red Wingate
Try a clean install of PHP5 otherwise head over to the interals list to make sure it won't be a showstopper for the Release sceduled for today. -- red Josh Close wrote: I installed php-5.0.0 and I get these error when doing "php -v" PHP Warning: Function registration failed -

Re: [PHP] safe mode/open basedir not working ?

2004-06-30 Thread Red Wingate
Thats just what he said :p Robert Mena wrote: Marek, but the program was executed using a system call from a php script. - rt On Wed, 30 Jun 2004 23:50:02 +0200, Marek Kilimajer <[EMAIL PROTECTED]> wrote: robert mena wrote --- napísal:: Hi, I host a few virtual domains in apache 2 and use php. The

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
the header information ) I would recommend you to either use some kind of Newsgroup software or just try another e-mail client ( eg thunderbird ) -- red ps: stay calm :-) [...] oh woe is me! if only i hadn't offended thee, red, you wouldn't have sent such a hurtful email. from the depths of my

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
7;\"\\\_]{1,999}$# or even easier: #^[a-z0-9()][- a-z0-9(),.'\"\\\_]{1,999}$#i I replaced the delimiter / with # as you don't use it within the regexp and using / makes escaping the >>/<< even worse ( guess it's 7 / then ) Hope this helps you :-) -- red Pablo Gos

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
the first one was truncated but the second one was complete. Btw thx Chris for opening up yet another thread that could have been avoided if your client was configured correctly. -- red Chris W. Parker wrote: Pablo Gosse <mailto:[EMAIL PROTECTED]> on Wednesday, June 30, 2004 2:29 PM sai

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
yep, as i said it was displayed correctly everywhere expect in the forms oh i might mention - Mozilla worked well but IE destroyed the data (only in textareas) Torsten Roehr wrote: "Red Wingate" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [] Hi Red, I'm

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
[] Hi Red, I'm actually working on a project as well at the moment that uses utf8 data in MySQL. All chars should be OK when output with utf8_decode(). Do the chars only look wrong within textarea or also outside of form elements? [] Actually everything ( expect one language ... i gue

Re: [PHP] problem with embeded objects and reference

2004-06-30 Thread Red Wingate
better don't blame the other pal :-) http://screens.erisx.de/reply.gif -- red Red Wingate wrote: so, why don't you reply correctly? :p Chris W. Parker wrote: Vincent DUPONT <mailto:[EMAIL PROTECTED]> on Wednesday, June 30, 2004 1:05 PM said: Hi, hi. could anyone help on th

Re: [PHP] problem with embeded objects and reference

2004-06-30 Thread Red Wingate
so, why don't you reply correctly? :p Chris W. Parker wrote: Vincent DUPONT on Wednesday, June 30, 2004 1:05 PM said: Hi, hi. could anyone help on this 'by reference' problem. when starting a new thread please do not just reply to an ongoing thread and change the

[PHP] Re: problem with embeded objects and reference

2004-06-30 Thread Red Wingate
not the same objects ( equal but not same ). So i guess you need to -$main->setChild($child1); +$main->setChild(&$child1); and -$this->child = $child; +$this->child =& $child; // MUST !!! Now i see, $this->child = $child; copys the object instead of creating a ref. -- red Re

[PHP] Re: problem with embeded objects and reference

2004-06-30 Thread Red Wingate
Not sure over here, but isn't it $main->setChild(&$child1); Vincent Dupont wrote: Hi, could anyone help on this 'by reference' problem. I have 2 classes. The main class as a child class. The child class has properties (array) I would like to be able to manipulate the child's properties even after t

Re: [PHP] Re: How to escape apostrophe in HTML textbox exactly???

2004-06-30 Thread Red Wingate
[...] Bummer, mysql_escape_string() is available only in PHP 5 and up. I'm using PHP 4.3.1 [...] *mo* - wrong [quote] mysql_escape_string (PHP 4 >= 4.0.3, PHP 5) [/quote] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
[...] Can't you use utf8_decode() to display the utf8 encoded data? [...] The displayed data worked out fine for some languages but others didn't and even simple german chars like äöü won't show up correctly within a textarea. [...] Is this what you're looking for?: http://de2.php.net/manual/en/fun

[PHP] Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
ru, pl, ch, jp ... ) So my question is if anyone on this list has an idea on how to retrieve the data completely? Some kind of func_ConvertFromHTML() function. -- red -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Earliest PHP/FI

2004-06-30 Thread Red Wingate
maybe take a look here : http://museum.php.net/ otherwise do some research using google. Jeff Loiselle wrote: Does anyone know where I would be able to find the earliest version of PHP/FI or PHP possible? I am looking for the earliest possible version for academic reasons. Thanks in advace. -- P

[PHP] Re: How to escape apostrophe in HTML textbox exactly???

2004-06-30 Thread Red Wingate
use " to display the data in the input-text element and undo this before inserting it into the database function quoteToHtml ( $string ) { return str_replace( '"' , '"' , $string ); } function htmlToQuote ( $string ) { return str_replace( '"' , '"' , $string ); } Only way to go :-) Scott Fletch

Re: [PHP] Protecting database passwords

2004-06-30 Thread Red Wingate
even for the guy who wrote the source. it's allmost impossible to restore the data as the only option is a brute-force attempt. Chris W. Parker wrote: Red Wingate <mailto:[EMAIL PROTECTED]> on Wednesday, June 30, 2004 9:33 AM said: Hashing ... but i guess he wants to protected t

Re: [PHP] Protecting database passwords

2004-06-30 Thread Red Wingate
Hashing ... but i guess he wants to protected the password needed to access the DB not a PW stored in the DB. [...] MD5 - http://ie2.php.net/md5 One way in encryption. [...] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Fw: [PHP] Re: Regular expression

2004-06-30 Thread Red Wingate
Oh ... you forgot to include your account-info so i won't be able to send you the money :-/ [...] You're too nice.. Btw, I need some money. Send me money ASAP. It must be an amount greater than $200, and be delivered to me directly, thank you. [...] -- PHP General Mailing List (http://www.php.net/)

Re: Fw: [PHP] Re: Regular expression

2004-06-30 Thread Red Wingate
Sender ( $string ); $sender = array_map ( 'htmlspecialchars' , $sender ) ; print_r ( $sender ); } echo ''; } debug_FetchSender ( array ( 'FROM: Red Wingate <[EMAIL PROTECTED]>' , 'FROM: Red Wingate' , 'FROM: [EMAIL PROTECTED]&

[PHP] Re: Regular expression

2004-06-30 Thread Red Wingate
match( '#^from\s*:\s*([^>]+)(<([^>]+)>)?#si' ,$emailLine ,$parts ); break ; } } $name = $parts[1] ; $email = $parts[3] ; But you should consider the following: FROM: Red Wingate <[EMAIL PROTECTED]> FROM: Red Wingate FROM: [EMAIL PROTECTED] . Which makes working like this a

[PHP] Re: Saving variables in a session in a destructor

2004-06-30 Thread Red Wingate
Maybe you check out the internals archives as an discussion about this topic was held 1-2 days ago. > Hi all > > Using PHP5, I am trying to save some properties of an object when it > is destroyed in its destructor, __destruct(). However, I have found > that the session variable is NOT stored un

Re: [PHP] Question about executing PHP script

2004-06-29 Thread Red Wingate
Yep :-) [...] > can I do a #!/usr/bin/php -q at the begining of the text file? [...] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session file in /tmp

2004-06-29 Thread Red Wingate
i guess what u are looking for is session_destroy(); Binay wrote: > If i m getting ur problem correctly then u want to restrict the same user > logging from different machines concurrently. If tht being the case the > snippet u mentioned below alone won't solve the problem . you have > maintain a

Re: [PHP] Image Problem

2004-06-28 Thread Red Wingate
Read: The best database to store images in is the Filesystem because thats what it's for :-) Raditha Dissanayake wrote: Monil Chheda wrote: Hi, I store images in DB properly... no issues using the Storing an image directly in the database certainly isnt' the proper way of doing it :-) The com

[PHP] Re: Image support

2004-06-28 Thread Red Wingate
RTFM Gus wrote: I have PHP 4.3.6 I want to add image support to manipulate JPEGs. I downloaded http://www.boutell.com/gd but what I do next? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Works in Mozilla, not in IE

2004-06-28 Thread Red Wingate
I wish there wouldn't be so many ppl using IE anyway :) Matthew Sims wrote: * Thus wrote Robert Sossomon: That just put me right back at the beginning, IE trying to DL the PHP page... put your disposition back to attachment and send the vnd.ms-excel content type. Also, on how the behaviour IE will

Re: [PHP] OOP, Classes, Sharing Code

2004-06-28 Thread Red Wingate
Look correct from my point of view... class Portfolio { var $portfolioID ; var $albums = array () ; function Portfolio ( $newID ) { $this->portfolioID = $newID ; } function addAlbum ( $album ) { $this->albums[] = $album ; } function getAlbum () { return curren

[PHP] Re: OT?? -> calling frames within frames

2004-06-18 Thread Red Wingate
u use parent.handleFrameRedirect( <framename> , <url> ); Another way is calling this directly within the frame: parent.document.frames[ <framename> ].document.location.href = <url> ; -- red Robert Sossomon wrote: I have two frames (A and main) When I pull up one page

Re: [PHP] Can I detect size of files which are too large to upload?

2004-06-18 Thread Red Wingate
Right, guess i saw some kind of JS that determined the size of the selected file and wrote it into an hidden field. Maybe you try it that way. -- red Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Hi folks. I'm just tweaking the

[PHP] Re: Unit Testing

2004-06-16 Thread Red Wingate
Allmost forgot about this one: http://www.phppatterns.com/index.php/article/articleview/33/1/2/ very well written ( phpPatterns() ) covers some other nice topics as well, allways worth a read. -- red Red Wingate wrote: Used all but 'Generic PHP Framework' and everything was quite fine

[PHP] Re: Unit Testing

2004-06-16 Thread Red Wingate
Used all but 'Generic PHP Framework' and everything was quite fine and worked out just as i expected. But i was still missing some features which made me build my own small library to fit into my Framework. -- red Rick Fletcher wrote: Has anyone done any PHP unit testing? I've been

[PHP] Re: file knowing its own directory

2004-06-09 Thread Red Wingate
the magic constant __FILE__ will give you the absolut filesystem location of the file it is called. Eg: /home/www/tests/foo.php -> will print: '/home/www/tests/foo.php'; to retrieve the path only you could do: /home/www/tests/foo.php -> will print: '/home/www/tests/'; hope this helps :-) Dennis

Re: [PHP] Expedia.com

2004-06-09 Thread Red Wingate
Allmost, after having a quick look at the source i tell you they do it like that: ... loading stuff here ... page loading here done? JS: document.getElementByid('loading').display='none'; take a look for yourself :-) James Harrell wrote: Hi Rene, Here's a thought- make your anim

[PHP] Re: MySQL equivalent for odbc_result_all()???????

2004-06-09 Thread Red Wingate
Some old piece of source i found in my libs: function sql_dump_result ( $result ) { $line = ''; $head = ''; while ( $temp = mysql_fetch_assoc( $result ) ){ if ( empty ( $head ) ) { $keys = array_keys($temp); $head = ''.implode('',$keys).''; } $line .= ''.implode(''

Re: [PHP] Multiple substring replacement

2004-05-24 Thread Red Wingate
In this special case you would even use 'file' to read the content of the file into an array and use 'implode' to replace every \n with $content = implode( "" , file ( './my_file.txt' ) ); -- red Brent Baisley wrote: Normally, I would say str_replace(),

[PHP] Re: Sorting text with multibyte characters

2004-05-01 Thread Red Wingate
Run into this before, PHP seams to do quite well when you set the locale right ( de_DE ) which will place AÄBCD instead of ABCDÄÖÜ. Hope this helps :-) -- red Michal Migurski wrote: Hi, Does anyone have any thoughts on how to effectively sort text with multi byte characters? I am

[PHP] Re: Select from 24 tables

2004-05-01 Thread Red Wingate
First, this is a MySQL Question, next time you better send your request to a list which covers your type of question. use tablename.fieldname in your WHERE clause if you have fields with the same name. -- red Dave Carrera wrote: Hi List, How do I select data from 24 table in my database. Each

Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Red Wingate
Pattern are always done using OOP, but phppatterns that is one of the best sources on this topic i could think of :-) -- red [] > Red, can you provide any more info or resources on a "registry-pattern"? > > I've found this: > http://www.phppatterns.com/index.php

Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Red Wingate
ed variables. -- red That makes local copies only, still no access to the global variable The other thing to consider is that everything dies at the conclusion of the function. It may be better to do this via a class construct -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: $_SERVER['SERVER_NAME'] in read-only.

2004-04-29 Thread Red Wingate
side your script you won't run into trouble - I know some ppl like to use such strange work-arounds ;-) Otherwise using define ( 'SERVER_NAME' , $_SERVER['SERVER_NAME'] ); right at startup will usually solve your problem ( as workarounds will most likely kill other scripts if

Re: [PHP] OR

2004-04-25 Thread Red Wingate
BEEP wrong :) http://www.php.net/manual/en/language.operators.php#language.operators.precedence therefore: $a AND $b OR $c AND $d is not equal $a AND $b || $c AND $d but is equal to $a && $b || $c && $d -- red Evan Nemerson wrote: On Sunday 25 April 2004 12:14 am, Aidan L

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Red Wingate
of all would make sure if $a is an array and not start with the first index ( which doesn't exist as $a is not even an array ) -- red PS: PHP5 says: Fatal error: Cannot use string offset as an array in /www/htdocs test_offset.php on line 6 [...] > Hi > > In PHP5 the behaviour of

[PHP] Re: SQL Hell

2004-04-21 Thread Red Wingate
Guess some guys don't get the point of this posting or have no idea what foreign keys are about. This problem can easily be solved using JOINs -- red Lester Caine wrote: Jason Barnett wrote: So far I've made multiple statements pulling out all the data and using PHP to for

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Red Wingate
s by using the imap_thread function which will return the structure of the mails. But you will have serious performance troubles as you are only allowed to fetch all headers at once :-( -- red -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Red Wingate
[...] > According to historical records, on Tue, 20 Apr 2004 18:31:19 +0200 Red > Wingate <[EMAIL PROTECTED]> wrote about "Re: [PHP] Why NNTP is not default > protocol for php groups": > >>[...] >>> That is mostly Outlook and OE that are real good at tra

[PHP] Re: Logic problem

2004-04-20 Thread Red Wingate
As foreach is a language-construct you cannot concat it to a string. try something like: $temp = '.'; foreach ( $array AS $key ) $temp .= ''.$key.''; $temp .= ''; instead --red [...] > Hi All, > > I am having a logic pr

RE: [PHP] Re: Converting XML into something PHP like....

2004-04-20 Thread Red Wingate
Nunners wrote: Array != Object echo $data->Title .''; echo $data->avail_dataset[0]->dept_date .''; etc. pp There are some examples on how to convert your XML-Dump into an Array check out the comments over at php.net -- red [...] > Hi Folks, > > At th

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Red Wingate
[...] > That is mostly Outlook and OE that are real good at trashing the Xref ... > others (old) clients do it too, but OE is the biggest sinner in that > aspect... (and Outlook runs on the OE engine when it comes to mail). [...] who is outlook ? :-) -- PHP General Mailing List (http://www.php.n

Re: [PHP] Re: <button> tag

2004-04-20 Thread Red Wingate
Try something like this: function submit_form( type ) { document.forms['submit_form'].elements['mode'].value = type; document.forms['submit_form'].submit(); } [...] > switch ($_POST['submit']) > { > case "edit": ... > case "new": ... > } [...] -- PHP General Mailing List

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Maybe you take a look at the source as there ARE NO linebreaks in any wrong places. I know the source produced by PHP's Source functions is a mess but take yourself a while and you will see there are no linebreaks at all :p -- red Aidan Lister wrote: > Here's a PHP4 example: > h

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
I just build a testcase to check wether PHP does or not and it doesn't even if i have 1080 chars in a line :p -- red > No, PHP explicity inserts at 80chars > > > "Red Wingate" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Red

RE: [PHP] Unwanted e-mails

2004-04-20 Thread Red Wingate
taken a slight look at the mail you got, you might have noticed 'dswu27.btconnect.com'. Now, someone registered an e-mail adress to PHP.General [EMAIL PROTECTED] which bounces every message back it gets from the list (right to the author of the mail as is does a simple reply. -- red -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: $PHP_SELF problem

2004-04-20 Thread Red Wingate
gt; getNavigation() in the Navigation object called by another program. > You better check the docs on 'global' and $GLOBALS :-) -- red > Why? > > The Navigation object is called like this: > include ("Navigation.php4"); > $myNavigation = new Navigation ("

[PHP] Re: slow upload with http post

2004-04-20 Thread Red Wingate
Yavuz maFelak wrote: > Hello > I have a webserver that running php4.3.x,mysql3.5x,apache1.3.x on > Mandrake9. I intended to transfer this server to another server. > I installed Freebsd4.9 on newserver. and certainly apache1.3x,php4,mysql > and concerning components. it works well. and I have a

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Red Wingate wrote: > Aidan Lister wrote: > >> Why do these functions wrap at approximately 80 chars? It's stupid! How >> can this be worked around? > > It doesn't check the source to see that the browser wraps the text as it > reaches the border of the w

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Aidan Lister wrote: > Why do these functions wrap at approximately 80 chars? It's stupid! How > can this be worked around? It doesn't check the source to see that the browser wraps the text as it reaches the border of the window. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Unwanted e-mails

2004-04-19 Thread Red Wingate
Is php.net bounceing your posts or does your ISP bounce your e-mails? maybe you could send us a copy to have a look? -- red Lester Caine wrote: > Chris W. Parker wrote: > >> but your messages *ARE* getting accepted otherwise i would not be >> reading this email right now! &g

Re: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-19 Thread Red Wingate
Nice one here, got some class for this type of handling as well but it will also do some nice magic when it comes to checking for valid data or displaying the input again for validation :-) My way to go: 1. Display the form 2. Check all required fields (name start with req_) 2.1 ( ok ) Parse page

[PHP] Re: Flatten/Unflatten arrays

2004-04-19 Thread Red Wingate
Orangehairedboy wrote: Hi, check out http://php.net/serialize and http://php.net/unserialize . hope this helps :-) -- red [...] > Hi all, > > In Perl there is a way to flatten an array into a string, and a matching > function to unflatten the array. > > This is different fr

RE: [PHP] FW: Resizing Pictures

2004-04-19 Thread Red Wingate
Maybe you should take a look at PHPs Image functions, finding out which function matches your needs is not that hard :-) If you don't find the right functions you can also take a look at this list's archives as this topic was raised around 5 times 04/04 :-p -- red [...] &

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Red Wingate
Same here, just installed some Newsgroup Software and everything works just fine for me :-) -- red Justin Patrin wrote: Curt Zirzow wrote: * Thus wrote T. H. Grejc ([EMAIL PROTECTED]): Hello, I've seen this subject before, but never really got any answer. PHP have news serv

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Red Wingate
Same here, just installed some Newsgroup Software and everything works just fine for me :-) -- red Justin Patrin wrote: Curt Zirzow wrote: * Thus wrote T. H. Grejc ([EMAIL PROTECTED]): Hello, I've seen this subject before, but never really got any answer. PHP have news serv

AW: [PHP] example from meloni not working

2004-04-18 Thread Red Wingate
Execute $sql :) -- red -Ursprüngliche Nachricht- Von: Anthony Ritter [mailto:[EMAIL PROTECTED] Gesendet: Sunday, April 18, 2004 7:42 PM An: [EMAIL PROTECTED] Betreff: [PHP] example from meloni not working A basic ht counter script from Meloni's book on mysql (page 318). Not wo

Re: [PHP] Bar/Line Graph Tool

2004-04-16 Thread Red Wingate
PEAR has some very nice Tools for this job :-) -- red [...] > Good morning gang, > > I'm looking for a snazzy line/bar graph class. I've got GD running, with > just the basic fonts (I'm using an ISP, so I can't do anything about it!). > > Any ide

Re: [PHP] Compile PHP question

2004-04-15 Thread Red Wingate
experimental and the option --enable-cli is on by default. You may use --disable-cli to disable it. [/quote] Using: './configure --enable-cli --with-mysql' is just right :-) -- red [...] > > > Hi List, > > > > > > How do I compile php without apache, with mys

Re: [PHP] automatic doc generation for classes

2004-04-13 Thread Red Wingate
Back on-line :-) http://phpdoc.org/docs/HTMLSmartyConverter/default/phpDocumentor/ tutorial_tags.pkg.html [...] > well got it to work... there was problems with the way i was making their > comments... kept doing **/ at end of comment block instead of */ > > never did figure out what most of the

Re: [PHP] remote files handling

2004-04-13 Thread Red Wingate
http://de.php.net/filemtime [quote] As of PHP 5.0.0 this function can also be used with some URL wrappers. Refer to Appendix J for a listing of which wrappers support stat() family of functionality. [/quote] -- red [...] > hello sir > need help in remote files handling. i.e, i w

Re: [PHP] automatic doc generation for classes

2004-04-13 Thread Red Wingate
Which version of PHP and phpDocumentor are you using ? -- red Am Mittwoch, 14. April 2004 06:25 schrieb Andy B: > so far it looks good... i got a test class/package to compile as far as the > docs go but now when i try to do more with it it always crashes: > c:> c:\php\cli\php -t

Re: [PHP] storing an array in an ini file

2004-04-13 Thread Red Wingate
nfig_param[1]; $value = trim(preg_replace( $match_value , "\\3\\4" , $config_param[3] )); $sub_pointer =& $pointer; while ( preg_match( $match_index , $index_name , $temp ) ){ $sub_pointer =& $sub_pointer[$temp[1]]; $index_name = substr($index_

Re: [PHP] Getting the barcode

2004-04-13 Thread Red Wingate
it's preg_match_all Am Dienstag, 13. April 2004 15:05 schrieb Brent Clark: > Hi All > I have asked this question before, and the solution was partyly solved, I > hope hope someone can help me again. > > I have a binary file ( readbar ) that I execute with exec(). > and it give me an output as so:

Re: [PHP] intermittent problems using ftp_get ...Help!

2004-04-13 Thread Red Wingate
Maybe the max number of connections to the FTP server is reached? My provider allows only up to 3 FTP connections at the same time which causes similar problems to my scripts :-) -- red [...] > Can anyone tell me what would cause intermittent problems downloading files > using ftp_ge

Re: [PHP] PHP time zone

2004-04-13 Thread Red Wingate
Best: use gmmktime() and add the required offset by: $time_here = gmmktime() + ( $offset * 60 * 60 ) ; > how can get a specific time zone, not the server time. > > example: > if the server time is 13:15:46 I need to output that time +5hours > so 18:15:46 > > because the hosting server time is

Re: [PHP] Using WinNT login

2004-04-08 Thread Red Wingate
Search the archive, we had this topic about a month ago and i pointed out a quite good solution on this topic. -- red > Hi All, > > Is it possible to use the users WinNT network login for a php app? > If so can someone point me in the direction for a tutorial or directions.

Re: [PHP] page design and possible conflict??

2004-04-08 Thread Red Wingate
ok Am Donnerstag, 8. April 2004 14:45 schrieb Andy B: > dont know what his deal is but ok will close this idea now i guess.. > > - Original Message - > From: "Miles Thompson" <[EMAIL PROTECTED]> > To: "Andy B" <[EMAIL PROTECTED]> > Sent: Thursday, April 08, 2004 7:41 AM > Subject: Re: [PHP

Re: [PHP] Re: Administrator page and password problem

2004-04-07 Thread Red Wingate
Add this into the VERY last line : [...] 0) { $name = TRUE; } else { $name = FALSE; echo 'you have forgot to enter your name'; } // check for email adress if (strlen($_POST['email']) > 0) { $email = TRUE; } else { $email = FALSE; echo 'you have forgot to enter your email adress'; }

Re: [PHP] Re: Can someone with list access please remove these two?

2004-04-07 Thread Red Wingate
yep William Lovaton wrote: me too! -William El mi? 07-04-2004 a las 16:44, Justin Patrin escribió: Richard Davey wrote: Hi, Subject says it all - they're causing auto-responder junk to any list poster and it's annoying: Information Desk <[EMAIL PROTECTED]> Advance Credit Suisse Bank <[EMAIL

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
They are typecasted to match the current contexts needs - often a problem but even - but this is one of PHPs strenghs :-) -- red William Lovaton wrote: Yeah, sometimes this is an annoying problem with PHP. Somehow, "", null, 0 and "0" is the same thing. The last two

Re: [PHP] Administrator page and password problem

2004-04-07 Thread Red Wingate
You mixed up here a little :-) [...] > if (strlen($_POST['password1']) > 0) { > if ($_POST['password1'] == >($_POST['password2'] { > 1. $password = TRUE; > > } else { > $password = FALSE; > echo '' > } > } else { > $password = FALSE; >

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
refully the function that you propose is doing two things at once... at this level this is not a good idea. -William El mi? 07-04-2004 a las 12:39, Red Wingate escribió: No, as this would be yet another line of source. Maybe get those guys to add another function ctype_digit_and_not_empty(); -

Re: [PHP] Newbie question about operators

2004-04-07 Thread Red Wingate
arrays :-) you are defining arrays like: $x = array ( 'a' => 'Apple' , 'b' => 'Banana' , ... ); -- red Gabe wrote: Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and array

Re: [PHP] PHP OO concepts

2004-04-07 Thread Red Wingate
You will find some usefull ressources over at http://www.phppatterns.com/ -- red Robert Cummings wrote: [...] Hello, I have am checking out PHP OOP and it's pretty smooth. I have a decent amount of Java experience so PHP OOP is really easy to pick up. However I have a few questions

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
:-) -- red Dan Phiffer wrote: Red Wingate wrote: So, this one will work out quite well ( maybe one should take a look at the documentation of attributes() :-) Wow I can't believe I missed that. Hehe. I guess the lesson here is don't always trust what you get from print_r(). Than

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
ributes() AS $a => $b ){ echo $a .' --> '. $b .''; } $n++; } } -- red Dan Phiffer wrote: Red Wingate wrote: FALSE > $xml = simplexml_load_file( 'config.xml' ); foreach ( $xml->lib_error->p

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
{ echo $param['name'] ; // will output 'boolean' ! } -- red [...] Hello, I have what I hope to be a simple question about SimpleXML. Is it possible to get the attributes of a SimpleXML node as an associative array? Consider the following: '); print_r($sxe->at

Re: [PHP] confused big time

2004-04-07 Thread Red Wingate
You could even do: $sql .= " ( '".implode( "','" , $a )."' )"; This way everything is quoted though ( but this doesn't matter using MySQL anyway ). If you want to escape the values of $a you could use array_map to do this also without ha

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
No, as this would be yet another line of source. Maybe get those guys to add another function ctype_digit_and_not_empty(); -- red [...] > > * Thus wrote William Lovaton ([EMAIL PROTECTED]): > > > or modify is_numeric() to explictly perform an integer validation: > > >

  1   2   >