Re: [PHP] Last Record INSERT

2013-06-26 Thread Samuel Lopes Grigolato
AFAIK "mysql_[...]" is deprecated in favor of "mysqli_[...]" correspondent functions, there's nothing to do specifically with mysql[i]_insert_id. On Wed, Jun 26, 2013 at 3:01 PM, Tedd Sperling wrote: > On Jun 26, 2013, at 1:56 PM, Stuart Dallas wrote: > > On Wednesday, 26 June 2013 at 18:39, Te

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Samuel Lopes Grigolato
You can try this: *ALTER TABLE tbl AUTO_INCREMENT = 100;* * * *Source: *http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html (never did it myself, though) On Wed, Jun 26, 2013 at 2:07 PM, Tedd Sperling wrote: > Hi gang: > > I have a client where their next auto-increment number j

Re: [PHP] Some Advice

2013-06-25 Thread Samuel Lopes Grigolato
Just be cautious if going to check IP, because: 1) The two users could be in the same house or cybercafé, which gives them the same IP. 2) The user could be traveling with a wireless card, his IP would change quite a lot in this scenario. On Tue, Jun 25, 2013 at 9:32 AM, wrote: > You should at

Re: [PHP] Some Advice

2013-06-25 Thread Samuel Lopes Grigolato
But please, PLEASE, read carefully: *If a user were to copy and paste the URL of the page they were on, and someone else were to click on it, they would both be using the same session.* On Tue, Jun 25, 2013 at 9:17 AM, Samuel Lopes Grigolato < samuel.grigol...@gmail.com> wrote: > Hope

Re: [PHP] Some Advice

2013-06-25 Thread Samuel Lopes Grigolato
Hope it helps: http://stackoverflow.com/questions/3740845/php-session-without-cookies (go directly to the answer) On Tue, Jun 25, 2013 at 9:15 AM, Floyd Resler wrote: > I use sessions to store login information. However, a particular user of > a site can only access it at the library which has

Re: [PHP] PHP is Zero

2013-06-13 Thread Samuel Lopes Grigolato
Just found out that MySQL uses the same implicit conversion precedence on SQL clauses. That shows me that possibly exists some "higher order" rule that states this consistency, and changing that is outside the scope of PHP. On Thu, Jun 13, 2013 at 9:20 AM, Stuart Dallas wrote: > On 13 Jun 2013,

Re: AW: [PHP] PHP is Zero

2013-06-13 Thread Samuel Lopes Grigolato
I agree with you that this is a confusing and error-prone behavior, but I also agree with Richard Gray, I wouldn't try to change this for the same reason that a "1+1=3" shouldn't be touched if it's "correct" on a huge amount of existing codebases... On Thu, Jun 13, 2013 at 8:49 AM, BUSCHKE Danie

Re: [PHP] Detecting massive web hits

2013-04-12 Thread Samuel Lopes Grigolato
I don't know exactly how search engine spiders work, but just be cautious to not block these "users", they aren't customers but they may bring you some =). Again, I don't know if this is your case, but the possibility sparked on my mind anyway. Cheers. On Fri, Apr 12, 2013 at 12:23 PM, Angela B

Re: [PHP] target question

2013-03-25 Thread Samuel Lopes Grigolato
pup window), instead he will need to open the downloaded file in his computer. On Mon, Mar 25, 2013 at 12:23 PM, Jim Giner wrote: > On 3/25/2013 10:13 AM, Samuel Lopes Grigolato wrote: >> >> Have you tried to set a Content-Disposition header in the PHP script that >> creates

Re: [PHP] target question

2013-03-25 Thread Samuel Lopes Grigolato
Have you tried to set a Content-Disposition header in the PHP script that creates the PDF, asking the browser to "attach" the download? This way you don't even need a new window. Example from php.net/manual: // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="do

Re: [PHP] Re: application level variable file

2013-03-22 Thread Samuel Lopes Grigolato
I highly suggest you to read some begginers book or the php.net/manualbefore trying to implement other technologies concepts with PHP. That is because you WILL find some "tricks" to do what you want, and you'll think PHP is a big chunk of bad smelling code, a totally wrong concept. Forget momentar

Re: [PHP] variable type - conversion/checking

2013-03-18 Thread Samuel Lopes Grigolato
Sorry if I'm missing something, there's a lot of replies after my first post on this thread. Is there something wrong with the "floor()" approach? I liked the regex solution but isn't it more expensive and more verbose than just doing a well commented "is_numeric" plus "floor/ceil" math? Just try

Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Samuel Lopes Grigolato
Something like "if (is_numeric($var) && $var == floor($var))" will do the trick. I don't know if there's a better (more elegant) way. On Thu, Mar 14, 2013 at 3:09 PM, Matijn Woudt wrote: > On Thu, Mar 14, 2013 at 7:02 PM, georg wrote: > > > Hi, > > > > I have tried to find a way to check if a

Re: [PHP] Re: Generating CRUD code for normalized db

2013-03-11 Thread Samuel Lopes Grigolato
If you don't appreciate Open Source "solutions", why are you losing time on a Open Source Project Mailing List? Go pay (a lot) for a handholding framework and be happy =), just don't demotivate the ones who bring free software to reality, even if the free software is not as good as you would like.

RES: [PHP] Array help.

2012-10-24 Thread Samuel Lopes Grigolato
Could you try changing this: if($groupTest != FALSE) { to this: if($groupTest !== FALSE) { ? -Mensagem original- De: Paul Halliday [mailto:paul.halli...@gmail.com] Enviada em: quarta-feira, 24 de outubro de 2012 15:38 Para: PHP-General Assunto: [PHP] Array help. I am processing v4IP'

RES: [PHP] Re: User Timezone

2012-10-21 Thread Samuel Lopes Grigolato
Coincidentally, TODAY I had to adjust my clock one hour forward because of DST (poor sleep =[). No so easy-to-solve problem, after all... -Mensagem original- De: Matijn Woudt [mailto:tijn...@gmail.com] Enviada em: domingo, 21 de outubro de 2012 10:30 Para: Maciek Sokolewicz Cc: Karl DeSa

Re: [PHP] Re: User Timezone

2012-10-21 Thread Samuel Lopes Grigolato
in this database on an open format (okay, maybe this is not going to happen, maybe). Cheers, Samuel. On Sun, Oct 21, 2012 at 9:12 AM, Ashley Sheridan wrote: > > > Karl DeSaulniers wrote: > > > > >On Oct 21, 2012, at 5:01 AM, Maciek Sokolewicz wrote: > > > >> O

RES: [PHP] Re: User Timezone

2012-10-20 Thread Samuel Lopes Grigolato
ogle.com/places/) based on the State name, or use the HTML5 Geolocation API (http://www.w3schools.com/html/html5_geolocation.asp, I won't recommend as AFAIK it is not stable, others could correct me). Hope it helps. Cheers, Samuel. -Mensagem original- De: Maciek Sokolewicz [mailto:t

RES: [PHP] foreach

2012-10-16 Thread Samuel Lopes Grigolato
, you need to use the right tool for the job. If you're going to write some cryptographic API for mission-critical applications, or a network protocol for games with extreme bandwidth demands, every ">=" matters, otherwise, better to stick with readability and separation of concern

RES: [PHP] Re: limiting

2012-10-09 Thread Samuel Lopes Grigolato
I don't know if it has any value, but here's my 2 cents: People here expect tricky questions. Of course "to be tricky" is subjective and is based on your knowledge level. When posting, please try to write every bit of effort you had so far trying to solve your problem. Besides that, please, don

RES: [PHP] Re: {ATTENTION} Re: [PHP] base64_decode

2012-10-02 Thread Samuel Lopes Grigolato
Another way to decode and inspect such data is to use utilities like: http://www.motobit.com/util/base64-decoder-encoder.asp By the way, never saw before this kind of sloppy irritating malicious "obfuscation" =). Does your server allow execution of the "eval" function? I consider this a security

RES: [PHP] Re: problem with my login script

2012-10-02 Thread Samuel Lopes Grigolato
I follow this rule of thumb: small blocks of highly understandable code. If this demands ternary conditionals or breaks, so be it! -Mensagem original- De: Tim Streater [mailto:t...@clothears.org.uk] Enviada em: terça-feira, 2 de outubro de 2012 08:37 Para: PHP General List Assunto: [PHP]

RES: [PHP] Re: Joining a team, where no wiki or docs are available

2012-09-24 Thread Samuel Lopes Grigolato
What about using visual code coverage instead of callstacks? I think the big picture is easier to digest. Maybe a combination of both, as code coverage won't provide the "time" axis of the monster. Something like http://phpcoverage.sourceforge.net/ -Mensagem original- De: Mihamina Rakot

RES: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread Samuel Lopes Grigolato
I would recommend reading this article: http://www.infoq.com/articles/tips-to-developers-starting-on-large-apps It's targeted to Java developers, but the concepts are valid to any language. Hope it helps. Cheers, Samuel. -Mensagem original- De: AmirBehzad Eslami [mailto:behza

RES: [PHP] Day after Friday

2012-09-23 Thread Samuel Lopes Grigolato
a wider responsibility, you need to find and incentive creative talents, not just teach one or another native function. Cheers. Samuel. -Mensagem original- De: tamouse mailing lists [mailto:tamouse.li...@gmail.com] Enviada em: domingo, 23 de setembro de 2012 10:55 Para: php-general

RES: RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
setembro de 2012 12:35 Para: Samuel Lopes Grigolato Cc: 'PHP List' Assunto: Re: RES: RES: [PHP] Re: Need help to understand a code On Sat, 2012-09-22 at 12:12 -0300, Samuel Lopes Grigolato wrote: I disagree with you Ashley, some arguments can be found here: http://sqlblog.com/blogs/aaro

RES: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
requested to the database layer. +1 to Maciek's suggestion, had totally forgotten this one. Cheers. -Mensagem original- De: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Enviada em: sábado, 22 de setembro de 2012 11:52 Para: Samuel Lopes Grigolato; 'PHP List' Assunto: Re

RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Samuel Lopes Grigolato
n SQL queries. Samuel. -Mensagem original- De: Matijn Woudt [mailto:tijn...@gmail.com] Enviada em: sábado, 22 de setembro de 2012 11:02 Para: a...@ashleysheridan.co.uk Cc: Ashickur Rahman Noor; PHP List Assunto: Re: [PHP] Re: Need help to understand a code Op 22 sep. 2012 13:47 schreef &qu

RES: [PHP] Risks involved in MyISAM to Innodb

2012-09-21 Thread Samuel Lopes Grigolato
Sure, the address you're looking for is: <http://lists.mysql.com/> http://lists.mysql.com/ Good hunting =) De: Girish Talluru [mailto:girish.dev1...@gmail.com] Enviada em: sexta-feira, 21 de setembro de 2012 10:15 Para: Samuel Lopes Grigolato Cc: php-general@lists.php.net

RES: [PHP] Risks involved in MyISAM to Innodb

2012-09-21 Thread Samuel Lopes Grigolato
I would start trying my DBMS user list. Or maybe you're afraid of impacts on PHP code? Cheers. -Mensagem original- De: Girish Talluru [mailto:girish.dev1...@gmail.com] Enviada em: sexta-feira, 21 de setembro de 2012 10:04 Para: php-general@lists.php.net Assunto: [PHP] Risks involved in M

RES: [PHP] Highlight Search Results

2012-09-18 Thread Samuel Lopes Grigolato
If you're dealing with a high amount of search data, I highly advise you to use something like SOLR. Match highlighting and a lot of other awesome things is easy breeze with it. -Mensagem original- De: Floyd Resler [mailto:fres...@adex-intl.com] Enviada em: terça-feira, 18 de setembro de

RES: [PHP] fets() escaping some characters

2012-09-11 Thread Samuel Lopes Grigolato
This issue has to do with HTML markup. You need to properly "escape" characters before sending them as text to the browser. Try to use this PHP function to escape your string: echo htmlspecialchars($yourstringhere); Regards, Samuel. -Mensagem original- De: sunil meena [mailto:s

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Samuel Lopes Grigolato
Maybe you have a "wrote: > On Sun, 2012-08-26 at 11:02 +0100, Stuart Dallas wrote: > > > On 26 Aug 2012, at 03:56, Ashley Sheridan > wrote: > > > > > Through the browser I get: > > > > > > Parse error: syntax error, unexpected $end > > > in /var/www/html/siteinquestion/index.php on line 356 > > >

RES: [PHP] Dynamic Content thoughts

2012-08-24 Thread Samuel Lopes Grigolato
Do you mean the ">" quotation marks? Have you tried to create a simple Notepad++ macro? I do this for things like formatting SQL from SQL Editor to SQL String in code, and vice versa. Cheers. -Mensagem original- De: tamouse mailing lists [mailto:tamouse.li...@gmail.com] Enviada em: sex

[PHP] PHP OpenSSL - Problem with "openssl_pkcs7_verify"

2012-07-21 Thread Samuel Lopes Grigolato
lable today on php.net. Could someone please suggest what else can I try? Tried to google "SMIME_read_ASN1:no content type" but nothing so far. Regards, Samuel.

[PHP] dns lookups only half working in chroot

2009-09-09 Thread Samuel Vogel
Hey guys, I am cross-posting this to the PHP and the PHP-FPM lists, because both are applicable in my opinion. I have got a strange problem with my php-fpm chrooted PHP environment. PHP is chrooted to /var/www/. /var/www/etc looks like this: # ls -al /var/www/etc/ insgesamt 20 drwxr-xr-x 2 ro

Re: [PHP] Re: Instantiate SOAP Request Objects

2009-06-01 Thread Samuel Vogel
Am 01.06.2009 20:05 Uhr, schrieb Shawn McKenzie: Shawn McKenzie wrote: Samuel Vogel wrote: Hey, I would like to know how I can instantiate the types that I get via the __getTypes() function or know if this is even possible. I am asking because I have a webservice in which all

[PHP] Instantiate SOAP Request Objects

2009-06-01 Thread Samuel Vogel
Hey, I would like to know how I can instantiate the types that I get via the __getTypes() function or know if this is even possible. I am asking because I have a webservice in which all functions expect an specific object to be passed to them, rather than a list of arguments. And I am hoping t

[PHP] PHP5 strtotime

2008-03-10 Thread Samuel Marshall
database (MySQL) are showing some date in 1969. Can anyone say what is causing this or how to correct it? Thanks. Samuel Marshall

Re: [PHP] Weird Zend IDE Issue

2008-03-03 Thread Samuel Vogel
Richard Lynch schrieb: On Sun, March 2, 2008 11:07 pm, Steve Finkelstein wrote: Hi all, I know this isn't a forum for Zend IDE, but since there's probably a decent population here using it, I figured I'd ask away. I'm using 5.5.1 Professional on Mac OSX 10.5.2. My issue here is that all le

Re: [PHP] problem with url_fopen on free hosting environment

2007-11-29 Thread Samuel Vogel
'{print $6}' | awk ' BEGIN { FS = "<" } { print $1 } '` iptables -A INPUT -s $ownip -p tcp --dport 80 -j DROP iptables -A INPUT -s $ownip -p tcp --dport 443 -j DROP Maybe this helps somebody :) Regards, Samy Samuel Vogel schrieb: Thanks for the infos. I read

Re: [PHP] problem with url_fopen on free hosting environment

2007-11-28 Thread Samuel Vogel
y. But it would be much nicer if it would work on the iptables level. Regards, Samy Andrés Robinet schrieb: Hi Samuel, I found this forum topic the other day http://uclue.com/?xq=874, and I thought it's pretty nice as a start/overview. There's also mod_bandwidth for Apache,

Re: [PHP] problem with url_fopen on free hosting environment

2007-11-28 Thread Samuel Vogel
, FL 33308 | TEL 954-607-4207 | FAX 954-337-2695 Email: [EMAIL PROTECTED] | MSN Chat: [EMAIL PROTECTED] | SKYPE: bestplace | Web: http://www.bestplace.biz | Web: http://www.seo-diy.com -Original Message- From: Samuel Vogel [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 27, 2007

[PHP] problem with url_fopen on free hosting environment

2007-11-27 Thread Samuel Vogel
Hey guys, I am running an free hosting environment and do have some trouble with allow_url_fopen. Right now we prohibit this, but it's requested by many of our users. The problem is something like to following script, which calls itself over and over again, being run on our server: http://dom

Re: [PHP] Chmod a Directory

2007-10-09 Thread Samuel Vogel
You will have to loop through the directory recursively, running chmod() on every file there is! Regards, Samy abderrazzak nejeoui schrieb: Please how can i chmod a directory to 0777 i tried chmod ($myDirectory, 0777); but nothing happens thanks in advence Nejeoui -- PHP General Mailing

Re: [PHP] blocking exec() silently

2007-09-14 Thread Samuel Vogel
Actually I can not do that. The point of my question was, that I'm running kilu.de, a German Freehosting service. But many of our users can not cope with the error messages, occurring from the disabled_functions! I can't log to the error log, because the errors need to be displayed to our use

Re: [PHP] blocking exec() silently

2007-09-13 Thread Samuel Vogel
you dont get to just change some things and not others. Note: this from the handbook: It is important to remember that the standard PHP error handler is completely bypassed. -nathan On 9/13/07, Samuel Vogel <[EMAIL PROTECTED]> wrote: Hey, Thanks for the replies! safe-mode is not a

Re: [PHP] blocking exec() silently

2007-09-13 Thread Samuel Vogel
Hey, Thanks for the replies! safe-mode is not an option unfortunately! But changing the Error reporting, is the first thing I wanted to do, but when I asked if this was possible on this list, somebody replied, that it this is not possible! Could you point me to a way, how I can achieve, that

Re: [PHP] GD Library

2007-09-13 Thread Samuel Vogel
I would point you to MAMP: http://www.mamp.info/ It's like Xampp but designed all for a Mac... Easy to install, to configure and to user ;) Regards, Samy Greg Donald schrieb: On Thu, 13 Sep 2007, Steve Marquez wrote: I am running PHP 4.4.7 without the GD Library and need it to run. I am v

[PHP] blocking exec() silently

2007-09-12 Thread Samuel Vogel
Hey guys, Actually I'm still looking for a way to block for example the exec() function without throwing an error! Since there seems to be no way to do this, without hacking the code of php, it seems like that is what I'll have to do... Do you people think it would be a good way to just look

Re: [PHP] looking for the right mcrypt ciphers

2007-09-07 Thread Samuel Vogel
I solved the problem using bin2hex()! Regards, Samy Samuel Vogel schrieb: Hey guys, I'm wondering which mcrypt cipher will provide me with an encryted string, that can afterwards be encrypted again and is transverable without problems through an link in an e-mail. I would like to en

[PHP] looking for the right mcrypt ciphers

2007-09-07 Thread Samuel Vogel
Hey guys, I'm wondering which mcrypt cipher will provide me with an encryted string, that can afterwards be encrypted again and is transverable without problems through an link in an e-mail. I would like to encrypt some piece of information (up to 25 characters) and send it to the user in an e

Re: [PHP] using disable_functions silently

2007-08-23 Thread Samuel Vogel
That'd be at least some kind of a solution. I'm thinking of overwriting the functions I want to block with one, that just returns true and does nothing. How would I do that? Jay Blanchard schrieb: [snip] Unfortunately we would need a solution without changing the PHP code of our users. No way

Re: [PHP] using disable_functions silently

2007-08-22 Thread Samuel Vogel
Unfortunately we would need a solution without changing the PHP code of our users. No way to do that? Regards, Samy Chris schrieb: Samuel Vogel wrote: I would like to know, if there is any way, to use disable_functions silently. We are running an shared hosting environment and therefore

[PHP] using disable_functions silently

2007-08-22 Thread Samuel Vogel
I would like to know, if there is any way, to use disable_functions silently. We are running an shared hosting environment and therefore forbid the use of exec() etc. Many of our users, just seem to be to dumb to comment out exec() in phpBB etc. Since removing the exec()-calls works fine, is t

Re: [PHP] ini_set() security question

2007-06-01 Thread Samuel Vogel
I don't think it should be allowed. A comment from the ini_set page [1]: "If you set something using php_admin_value in httpd.conf it is then not possible to be set the value at runtime, even if it's NOT PHP_INI_SYSTEM. " So, I guess it must be a bug. Tijnema [1] http://www.php.net/manual/en/

Re: [PHP] ini_set() security question

2007-06-01 Thread Samuel Vogel
e not already on current PHP versions. On Thu, May 31, 2007 2:46 pm, Samuel Vogel wrote: There is no bug filed for this. There is only one older bug ( http://bugs.php.net/bug.php?id=38804 ) which makes me think overwriting with ini_set() shouldn't be possible! Richard Lynch schrieb: O

Re: [PHP] ini_set() security question

2007-05-31 Thread Samuel Vogel
There is no bug filed for this. There is only one older bug ( http://bugs.php.net/bug.php?id=38804 ) which makes me think overwriting with ini_set() shouldn't be possible! Richard Lynch schrieb: On Wed, May 30, 2007 3:34 pm, Samuel Vogel wrote: And what happens if you try to alloca

Re: [PHP] ini_set() security question

2007-05-30 Thread Samuel Vogel
Hi! Show us your test code? /etc/apache2/httpd.conf : php_admin_value memory_limit 3145728 iniset_test.php : new: ".$new; ?> The result is the following: old: 3145728 new: 20971520 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ini_set() security question

2007-05-30 Thread Samuel Vogel
And what happens if you try to allocate 3M of data? $foo = str_repeat('.', 3145728); Nothing. It does it without any errors. I can allocate up to 20MB (well a little bit less of course). Regards, Samy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] ini_set() security question

2007-05-30 Thread Samuel Vogel
Hello, I would like to allow the users to ini_set(), while disabling the risky options with php_admin_flag/value! I don't think php_admin_* can be over-ridden -- that's kinda the whole point of that. The Problem is, that i can be overwritten using ini_set()... I just found that out by t

[PHP] ini_set() security question

2007-05-29 Thread Samuel Vogel
I would be very interested in knowing which options, that are accessible with PHP_INI_ALL or PHP_INI_PERDIR, could be risky to allow on a shared hosting server. I would like to allow the users to ini_set(), while disabling the risky options with php_admin_flag/value! Stuff like 'memory_limit'

RE: [PHP] Extensions Directory (PEAR/PECL)

2006-05-19 Thread Robert Samuel White
[SNIP] > When I ran the command: > pecl install zip-1.3.1 > It intalled the zip.so file to: > /usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so > Extensions are compiled with a given Zend/PHP API. The zip extension you installed was compiled against the API dated 2005-09-22. I

[PHP] Extensions Directory (PEAR/PECL)

2006-05-18 Thread Robert Samuel White
Please let me know if this would be more appropriate to post in a PEAR or PECL forum. Today, I've been trying to install some extensions - in particular, the GD library and the ZIP library. I've finally managed to get it all working, but there was one issue that I'd like to clear up for future re

RE: [PHP] Re: [Repost] Getting rid of "Web page has expired" (POSTDATA Error)

2006-05-18 Thread Robert Samuel White
[SNIP] Now one thing bothers me: how do you redirect in step 4 if you have shown the form in step 3? How do you avoid a "Cannot modify header information - headers already sent by ..." error message? Nicolas Verhaeghe E-mail: [EMAIL PROTECTED] Phone: 602-490-8000 [/SNIP] Nicholas, As long

[PHP] Re: PHP and mySQL getting smashed...

2006-05-18 Thread Robert Samuel White
huge difference. Not to mention, the mysqli library has so many more functions available to you. ~Samuel

[PHP] Re: [Repost] Getting rid of "Web page has expired" (POSTDATA Error)

2006-05-18 Thread Robert Samuel White
You might want to modify your coding. The way I prevent this problem from ever happening is this: 1. The user completes information on the form. 2. The form is validated by PHP. 3. If there are errors, then the form is reshown with their values populated. 4. Once all errors are correcte

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
> If we are talking clickable links, why not focus on the construct > itself? Otherwise URLs are just part of the page's textual content... Very > difficult to parse that > Disseminating an tag isn't brain-meltingly difficult with a regex if > you put your mind to it... With or without quotes,

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
in a page, then they'll code their pages to make use of this limitation. -Original Message- From: Chrome [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 8:24 PM To: 'Robert Samuel White'; php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's [ANS

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
All pages used by my content management system must be in a valid format. Old-school style pages are never created so the solution I have come up with is perfect for my needs. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
In case any one is looking for a solution to a similar problem as me, here is the answer. I used the code from my original post as my guiding light, and with some experimentation, I figured it out. To get any URL, regardless of where it is located, use this: preg_match_all("#\'http://(.*)\'#U",

RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
ow.status = '[EMAIL PROTECTED]'; return true;" ONMOUSEOUT="window.status = ''; return true;">[EMAIL PROTECTED]eNetwizard, Inc. Featured Websiteshttp://www.autospeedgraphics.com/default.rsw'; return true;" STYLE="cursor: pointer;&q

RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
meone here might have the answer I need, and if so, I'd appreciate a response. If you don't know the answer, don't reply. Simple enough, don't you think? -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 4:28 PM To: Robert Samuel Wh

[PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
Can someone help me modify the following code? It was designed to search for all instances of [LEVEL#]...[/LEVEL#] I need a preg_match_all that will search for all of instances of an URL. It should be sophisticated enough to find something as complicated as this: http(s)://x.y.z.domain.com/dir/

[PHP] how to find the system tmp folder

2006-01-05 Thread Samuel DeVore
How does one find the system temp folder? from php? in a platform independant way

[PHP] Unbuffered Reads

2005-06-05 Thread Steven James Samuel Stapleton
Is there any way to perform an unbuffered read in PHP when reading from STDIN? I.E. if I have the code - $chr = ""; while(!feof(STDIN)) { $chr = fgetc(STDIN); //I could just as easily do fread(STDIN, 1) if($chr == " ") break; } - and enter the follo

[PHP] Extending DOMDocument

2005-03-11 Thread Samuel J. Greear
http://evilcode.net/cgi-bin/viewsvn.cgi/exhibition/trunk/lib/php/xml/xmltree.php?rev=106&view=auto ( http://tinyurl.com/5h47a ) I have been using the above to extend DOMDocument, as a quick workaround to avoid a root document element. Now that I have started using namespaces, it works grandl

Re: [PHP] Hashing strings

2005-02-17 Thread Gerard Samuel
Jason Barnett wrote: Gerard Samuel wrote: ... Im trying to determine if md5() would be the fastest, *cheapest* solution. ... What Im looking for is something where the generated hashes can be reproduced. For example, md5('foo') today, will be equal to md5('foo

Re: [PHP] Hashing strings

2005-02-17 Thread Gerard Samuel
Richard Lynch wrote: Gerard Samuel wrote: Im currently using md5() to hash strings to be used, as an id for a cache system. Im trying to determine if md5() would be the fastest, *cheapest* solution. The only native php functions that I know of are md5() and sha1(). Are there any other native

[PHP] Hashing strings

2005-02-17 Thread Gerard Samuel
Im currently using md5() to hash strings to be used, as an id for a cache system. Im trying to determine if md5() would be the fastest, *cheapest* solution. The only native php functions that I know of are md5() and sha1(). Are there any other native php functions that hash strings? Thanks -- PHP G

Re: AW: [PHP] Determine SERVER_NAME

2005-02-13 Thread Gerard Samuel
Bostjan Skufca @ domenca.com wrote: php_uname() That works -> $ php -r "var_dump(php_uname('n'));" string(20) "gladiator.trini0.org Thanks On Sunday 13 February 2005 20:37, Gerard Samuel wrote: Mirco Blitz wrote: Probably the Global Variable $SERVER_NA

Re: AW: [PHP] Determine SERVER_NAME

2005-02-13 Thread Gerard Samuel
Mirco Blitz wrote: Probably the Global Variable $SERVER_NAME helps you out. The global variable $SERVER_NAME is not available via cli (at least for me) -Ursprüngliche Nachricht- Von: Gerard Samuel [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 13. Februar 2005 19:33 An: php-general

[PHP] Determine SERVER_NAME

2005-02-13 Thread Gerard Samuel
Via cli that is. Is there anyway besides making an actual system call (i.e. exec()/system()/etc...) to determine the server's name via php's cli??? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php in free() error

2005-02-10 Thread Gerard Samuel
Jason Barnett wrote: Gerard Samuel wrote: ... $array = array(0 => array('world')); class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { function hasChildren() { return (is_array($this->current())); } function getChildren() {

[PHP] php in free() error

2005-02-10 Thread Gerard Samuel
Im playing around with iterators, and Im getting this error -> php in free(): warning: chunk is already free Im running php 5.0.3 on FreeBSD 5.3. Any ideas what may be wrong? Thanks $array = array(0 => array('world')); class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterato

Re: [PHP] PHP5 Exception Handling

2005-02-04 Thread Gerard Samuel
Jochem Maas wrote: Gerard Samuel wrote: Just bouncing a thought on you. I currently have a default exception handler setup. So far in the code, I throw an exception when something is wrong. i.e. Missing file, invalid argument, failed db connection etc... My thought was centering around if I still

[PHP] PHP5 Exception Handling

2005-02-04 Thread Gerard Samuel
Just bouncing a thought on you. I currently have a default exception handler setup. So far in the code, I throw an exception when something is wrong. i.e. Missing file, invalid argument, failed db connection etc... My thought was centering around if I still needed to use try/catch in the code, sinc

Re: [PHP] Re: debug_backtrace trick

2005-01-28 Thread Gerard Samuel
David Robley wrote: On Friday 28 January 2005 17:09, Gerard Samuel wrote: There used to be a link in the manual user notes, I believe under debug_backtrace(). Where, there was some javascript voodoo, that would hide/unhide the backtrace. Does anyone have a link to this site? Thanks Maybe

[PHP] debug_backtrace trick

2005-01-27 Thread Gerard Samuel
There used to be a link in the manual user notes, I believe under debug_backtrace(). Where, there was some javascript voodoo, that would hide/unhide the backtrace. Does anyone have a link to this site? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

Re: [PHP] Eval string to array

2005-01-24 Thread Gerard Samuel
Jochem Maas wrote: Gerard Samuel wrote: Im trying to evaluate a string representation of the output of var_export(), as an array. To make a long story short, Im using curl to fetch another php page, that uses var_export to echo out php data structures. The fetched data via curl, is a string

[PHP] Eval string to array

2005-01-24 Thread Gerard Samuel
Im trying to evaluate a string representation of the output of var_export(), as an array. To make a long story short, Im using curl to fetch another php page, that uses var_export to echo out php data structures. The fetched data via curl, is a string. Something like -> array ( 'foo' => 'bar', )

RE: [PHP] help with nl2br

2005-01-21 Thread Samuel DeVore
You might check out http://photomatt.net/scripts/autop "Call this function on the text you want to convert. Think of this code like nl2br on steroids. This is basically a cross-platform set of regular expressions that takes text formatted only by newlines and transforms it into text properly marke

Re: [PHP] Re: SPL Exceptions

2005-01-20 Thread Gerard Samuel
M. Sokolewicz wrote: Gerard Samuel wrote: Does anyone know when the exception objects listed in item #6 at http://www.php.net/~helly/php/ext/spl/ will be available in base php5?? Thanks when you install the SPL extension :) I don't think it's planned for php5-source though [UPDATE 1-2

Re: [PHP] Re: SPL Exceptions

2005-01-19 Thread Gerard Samuel
M. Sokolewicz wrote: Gerard Samuel wrote: Does anyone know when the exception objects listed in item #6 at http://www.php.net/~helly/php/ext/spl/ will be available in base php5?? Thanks when you install the SPL extension :) I don't think it's planned for php5-source though Correct me i

[PHP] SPL Exceptions

2005-01-18 Thread Gerard Samuel
Does anyone know when the exception objects listed in item #6 at http://www.php.net/~helly/php/ext/spl/ will be available in base php5?? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Recursive Array Iterator

2005-01-18 Thread Gerard Samuel
Gerard Samuel wrote: Im trying to figure out how to create this. But Im stuck in the foreach loop. For some reason, $value in the foreach loop is not an object (Isn't is supposed to be?) Any hints to get me in the right direction. Thanks $array = array(1 => array(2 => array(3

[PHP] Recursive Array Iterator

2005-01-18 Thread Gerard Samuel
Im trying to figure out how to create this. But Im stuck in the foreach loop. For some reason, $value in the foreach loop is not an object (Isn't is supposed to be?) Any hints to get me in the right direction. Thanks $array = array(1 => array(2 => array(3 => array(4; class recursiveArrayItera

Re: [PHP] Re: PHP5 silently throwing exceptions???

2005-01-17 Thread Gerard Samuel
Jochem Maas wrote: Jason Barnett wrote: Gerard Samuel wrote: ... I haven't checked the source on this one so I can't guarantee that what I've said above is true, but I believe it to be true. Someone correct me if I'm wrong (wouldn't be the first time ;) seems to me l

Re: [PHP] Re: PHP5 silently throwing exceptions???

2005-01-17 Thread Gerard Samuel
Jason Barnett wrote: Gerard Samuel wrote: Jason Barnett wrote: Gerard Samuel wrote: I've debugged it down to this -> //try //{ $db->connect(); //} //catch(databaseException $e) //{ //throw $e; //} The ::connect() method is supposed to throw a databaseException if a connectio

Re: [PHP] Re: PHP5 silently throwing exceptions???

2005-01-17 Thread Gerard Samuel
Jason Barnett wrote: Gerard Samuel wrote: Im currently using php 5.0.3 on a dev box, trying to figure out how to correctly use exceptions in my code. Exceptions can be "A Good Thing". Per chance, I was monitoring the __autoload() function, and Im noticing that calls are being made to

  1   2   3   4   5   6   >