AW: [PHP] Second opinion needed - javascript blocker

2002-04-22 Thread Red Wingate
Maybe u should just strip all the javascript tags out Of the user-input (output page) with a script like this: $text = eregi_replace("< *script[^>]*>([^<]*)<[^>]*>","//1",$test); this should stip all the script-tags out of the text, but will keep the text between the tags. (the code was NOT tes

AW: [PHP] Re: Second opinion needed - javascript blocker

2002-04-22 Thread Red Wingate
He might want to use this function but doing so no links or bold underline Tags will be destroyed as well. -Ursprungliche Nachricht- Von: J Smith [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 22. April 2002 10:08 PM An: [EMAIL PROTECTED] Betreff: [PHP] Re: Second opinion needed - javascrip

AW: [PHP] Regex

2002-04-22 Thread Red Wingate
([[-a-zA-Z0-0_]*)\.([a-zA-Z]{2,4}$ should fit ur needs :P -Ursprungliche Nachricht- Von: James Taylor [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 22. April 2002 10:17 PM An: [EMAIL PROTECTED] Betreff: [PHP] Regex I'm trying to come up with a regular expression that will match the TL an

AW: [PHP] MSSQL help w/ auto_increment

2002-04-23 Thread Red Wingate
Try : news_id int(11) auto_increment -Ursprüngliche Nachricht- Von: Miguel Cruz [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 23. April 2002 5:16 PM An: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Betreff: Re: [PHP] MSSQL help w/ auto_increment Unfortunately there is a lot of variation from

[PHP] AW: [PHP-DB] auto-increment question

2002-04-23 Thread Red Wingate
You could consider to use zerofill, this would create ID's like 0001 0002 0003 etc. -Ursprüngliche Nachricht- Von: Dan Swensen [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 23. April 2002 7:22 AM An: php Betreff: [PHP-DB] auto-increment question Hi all, I'm wondering if there is a way

AW: [PHP] If else question

2002-04-23 Thread Red Wingate
H. I might be wrong but : > $ret = mysql_query($query); > while($row = mysql_fetch_array($ret)) > { > $user = $row['name']; > > $query = "SELECT uid, id, iname, image, quantity, type FROM {$config["prefix"]}_my_items WHERE uid={$session["uid"]} AND id = '$id' ORDER BY id"; >

[PHP] Question on the ~= Operator ...

2002-04-26 Thread Red Wingate
Hi there, I actually wanna know if anybody knows whats the ~= used for. Can this Op be used to apply an regex on a string in a perl-like manner? --red -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

AW: [PHP] reg-ex please

2002-04-27 Thread Red Wingate
Try it like this : $code[$i] = ereg_replace("&#([0-9] {5});" , "\\1.bing" , $code[$i] ); -Ursprüngliche Nachricht- Von: John Fishworld [mailto:[EMAIL PROTECTED]] Gesendet: Samstag, 27. April 2002 1:11 PM An: [EMAIL PROTECTED] Betreff: [PHP] reg-ex please Help please from one of t

AW: [PHP] reg-ex please

2002-04-27 Thread Red Wingate
Woops , one to many whitespace :) --> Try it like this : $code[$i] = ereg_replace("&#([0-9]{5});" , "\\1.bing" , $code[$i] ); -Ursprüngliche Nachricht- Von: Red Wingate [mailto:[EMAIL PROTECTED]] Gesendet: Samstag, 27. April 2002 1:26 PM An: [EMAIL P

AW: [PHP] reg-ex please

2002-04-27 Thread Red Wingate
Sure :) -Ursprüngliche Nachricht- Von: John Fishworld [mailto:[EMAIL PROTECTED]] Gesendet: Samstag, 27. April 2002 1:46 PM An: Red Wingate; [EMAIL PROTECTED] Betreff: Re: [PHP] reg-ex please Excellent :-))) Thanks ! Can I trouble you again with one more ! I get an url http

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] 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_get. > I have

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] storing an array in an ini file

2004-04-13 Thread Red Wingate
Hi, had the same problem before and got around this by writing my own tiny parser that should work just nicely ( as serializing is a pain-in-the-ass when editing the .ini file on foot ) Anyway i switched to using an XML-File now :-) define ('REGEXP_VARIABLE','[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\x

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 c:\src\test\ -

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 want to > know

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] Compile PHP question

2004-04-15 Thread Red Wingate
Wrong one here: http://de2.php.net/manual/en/features.commandline.php [quote] The CLI SAPI was released for the first time with PHP 4.2.0, but was still experimental and had to be explicitly enabled with --enable-cli when running ./configure. Since PHP 4.3.0 the CLI SAPI is no longer experiment

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 ideas? I've tried a few of the classes at www.phpclas

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 working fo

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 server at news.php.net

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 server at news.php.net

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 [...] > Hi Warren, > > Thanks

[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 from explode/implode

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

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! > > NO THEY ARE NOT

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

[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: 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: $PHP_SELF problem

2004-04-20 Thread Red Wingate
[EMAIL PROTECTED] wrote: > Hi > > $thisFileName = $PHP_SELF; works in a file just a few lines after the > program start. > > $thisFileName = $PHP_SELF; doesn't work (echo ("Debug: self: > $PHP_SELF"); returns Debug: self: ) if it's within function > getNavigation() in the Navigation object calle

RE: [PHP] Unwanted e-mails

2004-04-20 Thread Red Wingate
[...] >> > but your messages *ARE* getting accepted otherwise i would not be >> > reading this email right now! >> >> NO THEY ARE NOT - This reply HAS to be sent via the newsgroup! >> >> The bounce messages I am getting are as a result of .php.net NOT >> accepting my perfectly valid posts! > > N

[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

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
ttp://ircphp.com/users/imho/?file=function.str_chop.php > > Here's an example where PHP has explicitly wrapped at 80 chars, but only > the PHP, not the HTML. > http://ircphp.com/users/imho/ > > > > "Red Wingate" <[EMAIL PROTECTED]> wrote in message

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

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: 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 the end of the email is a var_dump of my XM

[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 problem. (insert jokes here) I am trying to create a

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

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

2004-04-20 Thread Red Wingate
Curt Zirzow wrote: > * Thus wrote T. H. Grejc ([EMAIL PROTECTED]): >> Justin Patrin wrote: >> >The threading works just fine. The problem is that users have ignorant >> >mail software that don't set the thread headers correctly. Even >> >newsgroup client software might do this. This is *not* the s

[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 formulate the informatio

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

2004-04-23 Thread Red Wingate
Hi, this is a plain design fault on your side: allright, just set $a to be a string, thats allright, now you check wether an string-offset ( foo ) is an array or not which causes an FATAL ERROR on PHP5. Now if you wrote some clean code you would have done: Now this makes sense as you first

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 Lister wrote: if (

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

2004-04-29 Thread Red Wingate
AFAIK the content of the superglobal variables cannot be changed ( even though i haven't found this in the docs i can remeber got beaten by PHP for doing so :-) ) Back to the problem ( if existent ): If you don't do stuff like '$_SERVER['SERVER_NAME'] = ;' inside your script you won't run into

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

2004-04-29 Thread Red Wingate
Again ain't no problem anyway foreach ( $GLOBALS AS $k => $v ) { $$k =& $GLOBALS[$k] ; } zap you are done ... again when using a function to include a file with relying on depts within the file you would most probably use a registry-pattern or similar to access the required variables. -- red

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/article/articleview/75/1/1/ ,

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

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

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(), but for converting "\n" to "", use the nl2

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

[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 looking around

[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

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 file

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

2004-06-18 Thread Red Wingate
Allright, even if it's OT Many ways to handle it, first would be to add a function within the frameset which handles redirects to the frames: function handleFrameRedirect ( frame , url ) { document.frames[ frame ].document.location.href = url ; } Within the frame you use par

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

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

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

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

[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

[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

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

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

[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

[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] Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
Hey guys, i ran into serious trouble when facing the problem to convert data, which was retrieved from a single form in our CMS to match the requirements of multiple charsets. Our CMS uses UTF-8 which worked out quite fine to display the data but caused weired symbols when displayed within a TEXTAR

[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

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

[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

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

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

[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 guess it

[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

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 on Wednesday, June 30, 2004 2:29 PM said: Hi

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
Usually it should be \\\ to get a \ ... now lets take a look at your regexp /^[a-zA-Z0-9\(\)]{1}[ a-zA-Z0-9\(\)_\,\.\-\'\"]{1,999}$/ ^[a-zA-Z0-9()] should work, as ( and ) only needs to be escaped when not within an []-block (cannot recall the name right now) [- a-zA-Z0-9(),.'\"\\\_]{1,999}$ s

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
Buddy, nobody ( and especialy not me ) would have offended you, if you wouldn't have flamed someone for creating a new thread by replying to another. Your E-Mail client breaks the Threads just like he did which makes reading the threads a pita. It was stated more then once that replying useing any

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

[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 - duplicate name - mss

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

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: 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 wrote: So,

[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 wrote: So,

Re: [PHP] load a URL and trap output

2004-03-12 Thread Red Wingate
Best way would be filegetcontents() and implode the content with "\n". eg: http://www.somedomain.com'); $temp = implode ( "\n" , $temp ); echo $temp ; ?> Chris Boget wrote: How do I make my application load a URL and trap the returned data so that it never creates any browser output? A

Re: [PHP] MySQL Writes Exception for PHP in License

2004-03-13 Thread Red Wingate
When you compile PHP --with-mysql=/path/to/mysql you will use the libs from the installed MySQL dist , when using the bundled MySQL libs by compiling --with-mysql you can use MySQL feature even if you haven't installed on your maschine. Am Samstag, 13. März 2004 19:24 schrieb Karl Timmermann: > So

Re: [PHP] HTML Utilities

2004-03-13 Thread Red Wingate
How about this: function toList ( $array ) { $temp = ''; foreach ( $array AS $item ) { if ( is_array ( $item ) ) { $temp .= ''.toList ( $array ).''; } else { $temp .= ''.$item.''; } } return $temp ; } $array = array ( 10 , 20 , arra

Re: [PHP] HTML Utilities

2004-03-13 Thread Red Wingate
#x27; ; } $array = array ( 10 , 20 , array ( 30 , 40 ) ); echo toList ( $array ) ; ?> This should now be well formated :-) Red Wingate wrote: How about this: function toList ( $array ) { $temp = ''; foreach ( $array AS $item ) { if ( is_array ( $item ) ) {

Re: [PHP] Re: determine logged in user

2004-03-16 Thread Red Wingate
Seen some interesting ways on doing this on the client. Basicly you run a bash script ( on autostart for example ) and pass the login-info which are saved in the enviroment to the server to make sure the user is known by the server as well. Another way could be to check wether the REMOTE_ADDR has a

Re: [PHP] Re: determine logged in user

2004-03-16 Thread Red Wingate
One last thing, check the PHP-DEV Archives someone send a quite nice trick on how to do that about 1-2 months ago. Bye, red Ashley wrote: Thanks for the info guys. I guess that I will just make a login screen of some sort to accomplish what I need. Thanks again, Ashley Red Wingate wrote

Re: [PHP] Re: determine logged in user

2004-03-16 Thread Red Wingate
Here you go: http://marc.theaimsgroup.com/?l=php-dev&m=107732506523441&w=2 Have fun, red Ashley wrote: Do you happen to know what the subject was? I cannot seem to find the particular post you are mentioning. Ashley Red Wingate wrote: One last thing, check the PHP-DEV Archives

Re: [PHP] Re:

2004-03-16 Thread Red Wingate
[...] > Why are so many people telling this poor person to escape their quotes? > That WILL NOT WORK in HTML. The correct way to do this is to use > htmlspecialchars() or htmlentities(). In fact, this should always be > done on dynamic values in an input or any other HTML data that should be > disp

Re: [PHP] Simple: Whats wrong with this?

2004-03-17 Thread Red Wingate
Maybe you guys should take a read about pre- and post-increment :-) Sam Masiello wrote: This drove me nuts for a while and instead of doing $variable++ I started using ++$variable and never had the problem again. --Sam Jake McHenry wrote: No. $correct++; Is all you need for the second conditio

  1   2   >