[PHP] AI:Categorizer
Is there avaiable something alike a port of PERL AI:Categorizer? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana https://hyperreal.info/pomoc/ { 1488 } WiNoNa = ) ( Szatan, Szatan...http://666-666.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] AI:Categorize
Evan Nemerson wrote: There is an artificial neural network extension in the CVS repository at sf.net/projects/fann (disclaimer, I'm the author of that extension and a developer for the FANN library). I don't know of any bayesian networks for PHP, but I could be wrong. Sorry to hear that, but that FANN thing is going to be useful to me too, so thank you anyway :8]. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana https://hyperreal.info/pomoc/ { 1488 } WiNoNa = ) ( Szatan, Szatan...http://666-666.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PCRE vs. POSIX-extended for regular expressions
Pablo Gosse wrote: Hi all. Quick quesiton about PCRE vs. POSIX-extended regular expressions. How much of a difference is there between these two types of regular expressions. I know I've read that PCRE is faster, but is it that much of a difference? PCRE are _way_ more advanced, I, personally, prefer them. Read about the syntax in the fine manual. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
Chris Edwards wrote: [cut] For example if I code echo This is a syntax error because of the double quote start and the single quote end '; I just get a blank screen. I have 14 pages of PHP settings printed out, so for any kind person that can help, I can respond with their values quickly. Try putting this at the beginning of your script: ini_set('display_errors', 1); -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Readfile, DAP and 3 questions
Ryan A wrote: Opera version 6.5 and 7... I already had that set. Try asking again on news:opera.general (if your server does not carry this newsgroup, try news.opera.com). There are more Opera - knowleable people there :8]. I recall that there is a solution, I just cannot find it right now. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Readfile, DAP and 3 questions
Ryan A wrote: I am using the example from the online manual: http://de3.php.net/manual/en/function.readfile.php to read a file that is in a .htaccess protected folder and pop a download box to the client. Surprisingly, after screwing around with the example code for 2 mins I got it working on IE and NN. Opera have always had one problem...instead of outputting somefile.zip it saves it as myPHPfileName.php and this is what it passes on to Download Accelerator Plus (DAP) 1. I am sure I am not the only one who noticed this...so...how did you tackle it? What version of Opera are you using? There are differences between versions plus various settings in the interface...Try setting Opera to identify file by extension if MIME type is unreliable in GUI (Alt-P for Preferences). -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] Current Month Only ?
Dave Carrera wrote: How do I return from a MySql db, rows which only contain data for the CURRENT Month / Year ? So this month would currently return 5 days worth of data since it?s the 5th of Jan 2004. Thank you in advance for any examples, pointers or urls that may help with this. What is your table structure? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] CVS on Windows
Chris W. Parker wrote: I will be interfacing with a CVS server not hosted on a Windows machine (it will be a bsd/*nix variant) and frankly I've never used it. What client do all you Windows people use? Also, how does it wotk in conjuction with your favorite editor? (Mine is HTML-Kit.) Is it necessary to run some command-line scripts to get the updates populated to the CVS server? I'm using WinCvs, it has it's own file listings, so I don't have to deal with the awful awful Explorer shell (I prefer Windows Commander about 100 times). The URL to the project is url: http://www.wincvs.org/download.html . If you want to edit a file, you just double click it and it opens in your configured editor. You can modify context menus any way you like and have all the most useful commands there, like Add, AddBinary, Commit, Update etc...It has support for Python scripts, too. Check it out. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Palm Pilot interaction
Dave G wrote: [...] But on the other hand, I was wondering if it may be possible to make use of the simple text editor on the Palm, or perhaps the newer Excel editors (which I have not yet tried), to create a file of flat data which could then be uploaded and interpreted by PHP and then entered into the DB. It seems to me that a simple text file would probably be easy to upload and read by PHP, but then I'd have to do more work to get the teachers to conform to layout standards and do more error checking since the text file allows for a wide range of mistakes to happen. The Excel file would make it easier for the teachers to see where to enter data and have less mistakes, but then it might be more difficult to get the data out of it, through PHP, and into the database. [...] Make a custom sheet in Excel for the teachers. Excel can generate a comma delimited (CSV) file out of a sheet. The you can very easily import that file into your PHP program :8] (there is even a function for it, IIRC). -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Fwd: failure notice]
Sophie Mattoug wrote: Does someone know why do I receive such messages each time I post to the list ?!? [snipped] Is a Illuminati conspiracy! Argh! -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Images in MySQL vs directory/file?
Derrick Fogle wrote: I've read that, given the choice, you should never store images in a database because it makes the database dog slow. But I've got some parameters and issues that might make a difference: We (at hyperreal.info) are storing all the images attached to articles in the database and all the structural images (belonging to design) in files on filesystem (in CVS). There are no problems and backups are much easier...The server runs on LAMP. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with imagick's imagick_readimage
John Clegg wrote: Problem: I am trying to get imagick to load an image from a URL. I can read from a file on the a file system no problem. Maybe you should simply circumvent the problem - download the file to your location into a temporary file, then act on this file locally...Use CURL. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] converting string into array with regex
CPT John W. Holmes wrote: From: Adam i Agnieszka Gasiorowski FNORD [EMAIL PROTECTED] No, no spaces between letters (otherways it would be very easy, indeed). So there is no way to match the space between alphanumeric chars and split on it? I was trying to avoid the loop solution. Of course there is. In fact, this example, direct from the manual, does exactly what you want... ?php $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); ? Imagine that!---John Holmes... LOL! :8]] You are SO right. I just KNEW the solution existed, I must have even read it a long time ago in the very manual... Sorry for wasting your precious time :8]. Thank you and all the others that tried to help! -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] converting string into array with regex
How would you specify a regex to convert string into array using preg_split? Is there some symbol specyfying a place between letters ? s t r i n g = array('s', 't', 'r', 'i', 'n', 'g') ^ ^ ^ ^ ^ , like this... -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] converting string into array with regex
Wouter van Vliet wrote: On vrijdag 5 december 2003 12:23 Burhan Khalid told the butterflies: Adam i Agnieszka Gasiorowski FNORD wrote: How would you specify a regex to convert string into array using preg_split? Is there some symbol specyfying a place between letters ? s t r i n g = array('s', 't', 'r', 'i', 'n', 'g') ^ ^ ^ ^ ^ You can access a string's characters with an index without declaring it as an array. $string = foo; echo $string{0}; //outputs f http://www.php.net/substr (has an example) Maybe this will solve your problem without using preg_split? -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com --- Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. You kinda need to realize that $String = 'FooBar'; print $String[4]; also prints out an 'B'. But this is adviced AGAINST because it is the same syntax as you do for array elements. To get a real array, do something like this: $Array = Array(); for($i=0;$istrlen($String);$i++) $Array[] = $String{$i}; But if you have a string with char-space-char stuff, split(' ', $String); would do too. No, no spaces between letters (otherways it would be very easy, indeed). So there is no way to match the space between alphanumeric chars and split on it? I was trying to avoid the loop solution. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: for help :how to detect norton client through php socket
lph wrote: why ? I manager a network including 2000 hosts, and i want to post the hosts ip and department not installing the norton client on our web page so i wonder to how to detect detect whether norton antivirus client are installed on the hosts through php socket If the Norton service is listening on some port, you could telnet into that port on particular IP and then look for a banner (a response, for example Norton Service Ready, Go Ahead or sth like that). -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] regular expression, image, name, alt, title, preg_match_all
I'm trying to develop a regex for matching with preg_match_all, I want to match such things like image name, image alt text, image title in construct like this: html... div class=class style=style img src=img=name alt=alt title=title / span class=class style=style text /span /div html... The rexex as for now is: define( 'REGEX_IMAGE_NAMES_AND_TITLES_AND_ALTS_FROM_CONTENT', '{ (?:\s*img\s+src\s*=\s*(?:|\')?\s*(?:img)?\s*=\s*) # img (?\b\S+\b) # name (?:title\s*=\s*(?:|\')) # title (?\b\S*\b) (?:|\')*\s* (?:alt\s*=\s*(?:|\'))# alt (?\b\S*\b) (?:|\')*\s* (?:\|\'||/|\s) # img / }Uix' ); , but it does not match. How can I fix it? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression, image, name, alt, title, preg_match_all
Sophie Mattoug wrote: Adam i Agnieszka Gasiorowski FNORD wrote: I'm trying to develop a regex for matching with preg_match_all, I want to match such things like image name, image alt text, image title in construct like this: html... div class=class style=style img src=img=name alt=alt title=title / span class=class style=style text /span /div html... The rexex as for now is: define( 'REGEX_IMAGE_NAMES_AND_TITLES_AND_ALTS_FROM_CONTENT', '{ (?:\s*img\s+src\s*=\s*(?:|\')?\s*(?:img)?\s*=\s*) # img (?\b\S+\b) # name (?:title\s*=\s*(?:|\')) # title (?\b\S*\b) (?:|\')*\s* (?:alt\s*=\s*(?:|\'))# alt (?\b\S*\b) (?:|\')*\s* (?:\|\'||/|\s) # img / }Uix' ); , but it does not match. How can I fix it? It's not so easy to match an entire IMG tag, because first of all the attributes are not always in the same order. If I were you, this is what I would do : ereg(img ([^]+), $your_text, $img_array); $i = 0; foreach ($img_array as $img) { while (ereg(^(.+)=\(.+)\, , $img, $regs)) $images[$i][$regs[1]] = $regs[2]; $i++; } Hope this helps, What I really want to get out of this regex is 1) image name 2) image alt text 3) image title text , so only those three parentheses are of capturing kind and the rest is marked as non-capturing... I wonder will this work (if I change this part): (?: (?:title\s*=\s*(?:|\')) # title (?\b\S*\b) (?:|\')*\s* | (?:alt\s*=\s*(?:|\'))# alt (?\b\S*\b) (?:|\')*\s* ) , notice the or character. I guess it should match, as the order is not important now... I love monster regexes ;8]. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression, image, name, alt, title, preg_match_all
Sophie Mattoug wrote: Sophie Mattoug wrote: Adam i Agnieszka Gasiorowski FNORD wrote: I'm trying to develop a regex for matching with preg_match_all, I want to match such things like image name, image alt text, image title in construct like this: html... div class=class style=style img src=img=name alt=alt title=title / span class=class style=style text /span /div html... The rexex as for now is: define( 'REGEX_IMAGE_NAMES_AND_TITLES_AND_ALTS_FROM_CONTENT', '{ (?:\s*img\s+src\s*=\s*(?:|\')?\s*(?:img)?\s*=\s*) # img (?\b\S+\b) # name (?:title\s*=\s*(?:|\')) # title (?\b\S*\b) (?:|\')*\s* (?:alt\s*=\s*(?:|\'))# alt (?\b\S*\b) (?:|\')*\s* (?:\|\'||/|\s) # img / }Uix' ); , but it does not match. How can I fix it? It's not so easy to match an entire IMG tag, because first of all the attributes are not always in the same order. If I were you, this is what I would do : ereg(img ([^]+), $your_text, $img_array); $i = 0; foreach ($img_array as $img) { while (ereg(^(.+)=\(.+)\, , $img, $regs)) $images[$i][$regs[1]] = $regs[2]; $i++; } Hope this helps, Sorry I made a mistake. Better do this: ereg(img ([^]+), $your_text, $img_array); $i = 0; foreach ($img_array as $img) { while (ereg(^(.+)=\(.+)\(.+)$, , $img, $regs)) { $images[$i][$regs[1]] = $regs[2]; $img = $regs[3]; } $i++; } Ah, now I get it. I'll try it (with preg-functions, as I prefer them). So I'll get something like $images = array( [0] = array( src = 'image1.jpg', alt = '', title = 'a cow' ), [1] ... ) ...nice :8]. Thank you! -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR::SOAP_Client, Google API
I'm trying to get ANYTHING out of google API (for now), but it doesn't let me. I use the SOAP_Client from PEAR project and the WDSL file you get from Google when you register your key for using with their API. When I give an action wrong parameters, everything works great, it complaints that I gave it wrong data. I provide RIGHT data then and...I get a blank screen. No errors in logs, no nothing. What can be wrong? All I did to downloaded from PEAR files was to change include paths so I could place all the required files in one directory (SOAP). The short test code follows (as you can see I tried the doGoogleSearch action, defined in the WDSL, too). It looks like it bombs even before the first echo...: Help me, I'm really depressed and frustrated now :8[. I hate it when it doesn't give any kind of feedback like this... ? require_once('SOAP/Client.php'); $key = 'my google key goes here'; $queryterms = 'marichuana'; /* $query = array( 'key' = $key, 'q' = $queryterms, 'start' = 0, 'maxResults' = 10, 'filter' = true, 'restrict' = '', 'safeSearch' = false, 'lr' = '', 'ie' = '', 'oe' = '' ); */ $query = array( 'key' = $key, 'phrase' = $queryterms ); $soapclient = new SOAP_Client('GoogleSearch.wsdl', true); $result = $soapclient - call('doSpellingSuggestion', $query); echo 'pre' . print_r($result, TRUE) . '/pre'; $i = 1; print(Top 10 results for strong$queryterms/strongbr /br /); foreach ($result as $key = $value) { if($key == 'resultElements') { foreach ($value as $key2 = $value2) { foreach($value2 as $key3 = $value3) { if($key3 == 'URL') { $snippet = substr(strip_tags($value2[snippet]), 0, 70); $summary = substr($value2[snippet], 0, 70); $title = substr(strip_tags($value2[title]), 0, 70); $cachedSize = $value2[cachedSize]; print(#$i: stronga href=\$value3\$title/a/strongbr /Summary: $summarybr /$value3 - $cachedSizehr /); $i++; } print($key3 $value3br); } } } print(Key: $key; Value: $valuebr\n); } ? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] Variable
Jorge Infante Osorio. wrote: I determinate the value of a variable in the botton of one page, and I want to use it in the middle of the page, inside a while structure, but I cantn, inside the while structure I calculate the value of this variable several times until I keep with the value that I want, the lastand I want that in eache of the repetition used the final value of the variable to display a result that I want. Use a break statement after you determine that the value is right, this will break the flow of the programm out of the while loop. I hope I got your question right :8]. Something like: while { ... if (condition is TRUE) break; ... } -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular Expression Help: genreate alphanumeric, 8 chars
David T-G wrote: Bogdan -- ...and then Bogdan Stancescu said... % % ...as in... % % ? % // Could've been done with ASCII sets, but this way % // you can easily tweak the eligible characters. % $eligible='abcdefghijklmnopqrstuvwxyz0123456789'; % $pwdLen=8; % $password=''; % for($i=0;$i$pwdLen;$i++) { % $password.=$eligible[rand(0,strlen($eligible))]; % } % echo(Your new password: $password\n); % ? Looks good to me. You're too kind; I was going to leave the exercise to the student to complete :-) How about, $password = strtolower(substr(md5(uniqid(time())), 0, 7)); Will get you a unique password consisting of 8 rather random lowercase alphanumerics. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add Reply-To to this list(s)
John W. Holmes wrote: Adam i Agnieszka Gasiorowski FNORD wrote: Thomas Svenson wrote: If you would stop using M$ Outlook and switch to a better mail client that supports mailing lists, your problem would be solved. I wouldn't mind that at all. What clients do you recommend for WindwosXP? I want a small client (note: I have to use Outlook for business purposes, but have the lists on a separate account). Try the Opera's 7 M2 (build-in revolutionary email and news client). Is this an advertisement or does it actually have the features everyone is looking for? It certainly is not a very _mature_ product, but it is very usable. It depends on what features you require...The most important for me is the whole email database concept, dynamic views and searches. I, personally, use both Netscape Mail, The Bat and Opera's M2, to do different duties. I'm a registered user of The Bat and Opera :8]. I guess I am an email fanatic ;8]. Anyway, this is rather off-topic here. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add Reply-To to this list(s)
John W. Holmes wrote: Try the Opera's 7 M2 (build-in revolutionary email and news client). Is this an advertisement or does it actually have the features everyone is looking for? Oh, it does automatically sort all complying mailing lists, BTW, no need to create filters manually - so it is rather mailing-list-aware :8]. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add Reply-To to this list(s)
Thomas Svenson wrote: If you would stop using M$ Outlook and switch to a better mail client that supports mailing lists, your problem would be solved. I wouldn't mind that at all. What clients do you recommend for WindwosXP? I want a small client (note: I have to use Outlook for business purposes, but have the lists on a separate account). Try the Opera's 7 M2 (build-in revolutionary email and news client). -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing security-problematic chars from strings
Troy S wrote: What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Do it the other way, allow only characters you know are safe and strip the rest. Use, for example, a preg_replace pattern with negated character range. Put all the allowed characters into this range and '' as replace text. $query = preg_replace('{[^' . preg_quote(ALLOWED_CHARS) . ']}', '', $query); , where ALLOWED_CHARS is a constant containing... allowed characters :8]. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sorting an array of regexes
There is an array of regexes, for example $array = array('moon', '[wh]ood', '[^as]eed' ... (about 300 entries). I want to sort it comparing to the character lenght of a regex. For example [wh]ood is 4 characters, moon is 4 characters. There are only letters of the alphabet and letter ranges present in those regexes. I want the longest ones first. How would you write the sorting function? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sorting an array of regexes
Eugene Lee wrote: On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka Gasiorowski FNORD wrote: : : There is an array of regexes, for example : : $array = array('moon', '[wh]ood', '[^as]eed' ... : (about 300 entries). : : I want to sort it comparing to the : character lenght of a regex. For example : [wh]ood is 4 characters, moon is 4 characters. : There are only letters of the alphabet and : letter ranges present in those regexes. I : want the longest ones first. : : How would you write the sorting function? This might be the most functionally correct, although it's definitely not the fastest route. Thank you, that will certainly work :8]. Does anyone have any thoughts how to make it faster? It is not VERY critical, because the calculation will be done only once, at initialization, but...well, you know :8]. * * * How about...if I count the number of ']' in string and then add it to the strlen - (the number of ']' x 2)? There are no [ nor ] in these except in the character range parts. Does that look faster than applying regular expression? function re_len($pat) { return strlen(preg_replace('/\[[^]]+]/', '_', $pat)); } function re_sort($a_pat, $b_pat) { $a = re_len($a_pat); $b = re_len($b_pat); if ($a == $b) { return 0; } return ($a $b ) ? -1 : 1; } usort($array, 're_sort'); BTW, re_len() will bomb on certain oddball patterns with strange ranges. Like? Sorry, I can't think of anything right now... -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] syntax problem, constants in quoted strings
How do you insert a constant into a quoted string, do I need to use concatenation operator like this quoted string . CONSTANT . quoted string, or there is some way to insert it inline, like normal variables? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sorting an array of regexes
Curt Zirzow wrote: * Thus wrote Adam i Agnieszka Gasiorowski FNORD ([EMAIL PROTECTED]): Eugene Lee wrote: On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka Gasiorowski FNORD wrote: : : There is an array of regexes, for example : : $array = array('moon', '[wh]ood', '[^as]eed' ... : (about 300 entries). : : I want to sort it comparing to the : character lenght of a regex. For example : [wh]ood is 4 characters, moon is 4 characters. : There are only letters of the alphabet and : letter ranges present in those regexes. I : want the longest ones first. : : How would you write the sorting function? This might be the most functionally correct, although it's definitely not the fastest route. Thank you, that will certainly work :8]. Does anyone have any thoughts how to make it faster? It is not VERY critical, because the calculation will be done only once, at initialization, but...well, you know :8]. Do these change all the time or are they rather static? I would suggest using this routine to generate the list to be used in your program, instead of doing this on the fly. Good idea... -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help create community newbie guide to security
Chris W. Parker wrote: 10. Use htmlentities() on data that will be put through a SQL query to prevent XSS attacks. http://php.net/htmlentities How is it going to interact with MySQL FULLTEXT search SQL queries, where the characters and are in use as modifiers? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] hard(?) syntax problem
I want to access a value of an array by key, but the array is not a variable - it is a constant. How do I do it? I tried $value = PL_ORT[$key]; , but this doesn't work (parse error)... I even tried $value = {PL_ORT[$key]}; -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Headers, outputting a file ..
Wouter van Vliet wrote: 110 $File = $this-Get($User); 111 112 foreach($File['Headers'] as $H) header($H);; 113 readfile($File['Path']); Do I see TWO ; here or it's just a typo? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] deprecated function list?
Chris wrote: How can I find a list of PHP functions that are deprecated? Also, how can I print to the browser the Notice message that would indicate that a function is depricated? Like: Notice: mysql(): This function is deprecated; use mysql_query() instead How about you do a search for 'deprecated' on php.net, selecting 'function reference' as a search area. It should give you a list of good hits... -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] counting files, choosing at random
David Otton wrote: On Wed, 13 Aug 2003 10:54:58 +0200, you wrote: I want to choose a file at random from a directory which adheres to certain naming scheme. I can't get it to work. It's probably something simple...Here is a relevant snippet: img src=/szukaj/images/i ? chdir('./szukaj/images/'); echo mt_rand(0, count(glob('i*.gif', GLOB_NOSORT)) - 1); ? Wrapping the glob() in the count() is just throwing away the filenames. Try something more like this. $names = glob('i*.gif', GLOB_NOSORT); if (sizeof ($names)) { $offset = mt_rand (0, sizeof ($names)); $name = $names[$offset]; } else { $name = 'not found'; } echo ($name); Thank you, it solved my problem (after minor tweaking). This list is just so great! :8]. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how do I spoof a get request
Analysis Solutions wrote: By that logic, you would think that PHP sucks, because there are plenty of sucky PHP applications. :-) I've had folks say things along these lines. Considering the number of PHP related vulnerabilities showing up in Bugtraq/Security Focus newsletter, PHP must REALLY suck. :) No, it just proves that it is a really popular language! :8] -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: counting files, choosing at random
Peng Cheng wrote: i think the problem is there is a newline between the img src=/szukaj/images/i and ? . try write them in the same line may be a solution. Yes, you are right, I noticed it myself while trying David's solution. Thanks anyway. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] counting files, choosing at random
I want to choose a file at random from a directory which adheres to certain naming scheme. I can't get it to work. It's probably something simple...Here is a relevant snippet: img src=/szukaj/images/i ? chdir('./szukaj/images/'); echo mt_rand(0, count(glob('i*.gif', GLOB_NOSORT)) - 1); ? .gif width=120 height=151 alt= title=PropaGanda border=0 / (the files are all called i??.gif and located in a directory /images/, which is a subdirectory of directory where the script is located (/szukaj/)). Can you help? -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Red Hat 9, Apache 2, and PHP
Diana wrote: Hi, that sounds really impressive. I'm using Redhat 9 with the stuff from their Edition, that means Apache 2 and php together. Never had any issues (so far.keep my fingers crossed). The server is not under heavy load, but it is indeed a production server. I know it is not recommended, but for this use (mysql apache php on that server in a company intranet, used for keeping a picture library administration issues) is it necessary to change it? Please advise. To my defence I have to say that the data on the server is backed up regularly, though not the OS itself, since if something ever happens it is less hassle to do a complete new install get the database back on. Any hints? We (at hyperreal.info) used PHP+Apache 2 for a while, but it created so many problems (stability, non working SSL, others) that we have returned to the 1.3.x version...and now everything works like it should :8]. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multi line regular expression?
Tim wrote: i have a string that contains the following: $mystring=EOS (((TITLE))) *color* == this is where the content goes it can spreed many lines ... == EOS; i'm using this line of code to try and get the content between == and == preg_match_all(|==(.+)==|,$mystring,$contents,PREG_PATTERN_ORDER); now, if i do a print_r($contents); the thing is empty. but if i put the content of my original variable all on one line (== line 1 _ line 2 _ line 3 _==), it works fine. is there something to get around this one line limit? url:http://pl.php.net/manual/en/pcre.pattern.modifiers.php -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] limit on displaying a LONGTEXT filed from MySQL database
Artoo wrote: For example supose the 150th character is the v in the word privileges I would want to finish displaying the word and end with privileges rather then ending withpriv How about using the SUBSTRING_INDEX function with delimiter set to ' ' (space). You could select for example - 25 words - with it, I think. -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php