[PHP] Re: Get recursive array

2006-02-06 Thread Bruno B B Magalhães
& $reference[$argument]; } } unset($reference); } And I didn't double posted, I had to subscribe... and I didn't know if my message had been sent or not. Thanks, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To un

[PHP] Get recursive array

2006-02-06 Thread Bruno B B Magalhães
a function that gets those values and subvalues, but there is one small catch, I need to dynamically get parsed arguments and check if key exists and returns it... I tried func_num_args, and func_get_args, without success. Any ideas? Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Get recursive array

2006-02-06 Thread Bruno B B Magalhães
a function that gets those values and subvalues, but there is one small catch, I need to dynamically get parsed arguments and check if key exists and returns it... I tried func_num_args, and func_get_args, without success. Any ideas? Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How to read PHP variables.

2005-07-15 Thread Bruno B B Magalhães
write the strings.. Best Regards, Bruno B B Magalhães -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How to read PHP variables.

2005-07-12 Thread Bruno B B Magalhães
Hi you all! That's my problem: I have a configuration files with the following structure... $vars['varname'] = 'varvalue'; And I would like to have a module to change those parameters, but I don't know how to write a pattern to match it... Thanks in advan

Re: [PHP] TimeStamp BEFORE 1970 AND AFTER 2035

2005-07-07 Thread Bruno B B Magalhães
preg_match('([0-9][0-9][0-9][0-9])', $input, $year); $input = str_replace($year[0], '1976', $input); return (float)floor(strtotime($input) + (($year[0] - 1976) * (31557376.189582))); } } Shoot! Best Regards, Bruno B B Magalhaes

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
and now multiply by number of seconds in a year (31557376.189582) before Gregorian Calendar, and we will get: -1262295047.583 Now we calculate the timestamp from 01/01/1976: 189313200 Now we have the final equation: 189313200 + (-1262295047.583). The result is a negative timestamp: -1072981847

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
return $output; } else { preg_match('([0-2][0-9][0-9][0-9])', $input, $year); preg_replace('([0-2][0-9][0-9][0-9])', '1976', $input); return floor(strtotime($input) + (($year[0] - 1976) * (31557376.189582))); } } Tha

Re: [PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
I found a round number (31557376.189582). Well, any help is appreciate. At least now I can work on a windows box. Best Regards, Bruno B B Magalhaes On Jul 7, 2005, at 3:42 PM, Richard Davey wrote: Hello Bruno, Thursday, July 7, 2005, 7:04:44 PM, you wrote: BBBM> I've read the manual, and

[PHP] TimeStamp BEFORE 1970

2005-07-07 Thread Bruno B B Magalhães
t;[EMAIL PROTECTED]> * @copyright 2004 by Bruno B B Magalhaes * @copyright 2005 by B3M Development Team * @link http://www.bbbm.com.br/platform/

Re: [PHP] Formating

2005-07-07 Thread Bruno B B Magalhães
Hi Richard, On Jul 5, 2005, at 6:20 PM, Richard Lynch wrote: On Mon, July 4, 2005 6:48 pm, Bruno B B Magalhães said: For example I have a brazilian zipcode witch is stored in database as Is she a Good Witch, or a Bad Witch? :-) Ups, hehehehe! 22252970 and must be formatted as N-NNN

[PHP] Formating

2005-07-05 Thread Bruno B B Magalhães
only, for example 05117635472 and outputted as NNN.NNN.NNN-NN... Is that any way that I can do it generic, storing the formatting strings ('N- NNN') with languages strings, so it is localised and this would be parsed as: string::format($string, $format); Best Regards, Brun

Re: [PHP] Re: class calling script

2005-04-12 Thread Bruno B B Magalhães
return true; } return true; } else { return $this->_mdl->$module_name = false; return false; } } else { return $this->_mdl->$module_name = false; return false; } } else { return $this->_mdl->$module_name = false; re

Re: [PHP] Simple Licensing System

2005-04-09 Thread Bruno B B Magalhães
Hi Richard, And how do I generate this, and how would I check it?!?! Thanks, Bruno B B Magalhaes On Apr 8, 2005, at 11:48 PM, Richard Lynch wrote: On Fri, April 8, 2005 1:06 pm, Bruno B B Magalhães said: I need a help with a licensing system, I want something very simple, for example a simple var

[PHP] Simple Licensing System

2005-04-08 Thread Bruno B B Magalhães
ave a simple idea for it? Best Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] $GLOBALS, any probolems?

2005-02-09 Thread Bruno B B Magalhães
Hi guys, is there any problems using $GLOBALS superglobal to carry all my global classes instances? For example: $GLOBALS['myclass'] = new myclass(); Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] URGENT: Break-lines disappearing.

2005-01-20 Thread Bruno B B Magalhães
} else { return $input_data; } } Where are the break-lines?!?!? I am really desperate! Please! I am using MySQL and PHP4. Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Dates, times, timezones...

2005-01-19 Thread Bruno B B Magalhães
7;s easy to convert to any format and to do math with dates Is this the way? Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Checking if

2005-01-12 Thread Bruno B B Magalhães
Richard, my solution right know is: if(substr($url,-1) != '/') { $url = $url.'/'; } Simple and fast... :) Regards, Bruno B B Magalhaes On Jan 12, 2005, at 3:37 PM, Richard Lynch wrote: Bruno B B Magalhães wrote: how to determine if the last char of a string is a &

[PHP] Checking if

2005-01-11 Thread Bruno B B Magalhães
Hi people, how to determine if the last char of a string is a '/'... The problem, a webpage can be accessed by www.domain.com/page.php or www.domain.com/page.php/ Regards, Bruno B B Magalhães -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] UBB Code correct use

2005-01-11 Thread Bruno B B Magalhães
Database ---> UBB Decode ---> Display Did you get what my question is? :) What is the correct order... I mean, because I am having problems when editing an article all the BRs are being duplicated, and other problems that have to do with the order. Regards, Bruno B B Magalhaes -- PHP Ge

Re: [PHP] Re: Pagination Optimization

2005-01-08 Thread Bruno B B Magalhães
{ return null; } return $results; } === Regards, Bruno B B Magalhães On Jan 7, 2005, at 10:09 PM, M. Sokolewicz wrote: first of all, you're running 4 queries here. 4 queries is a lot! Especially when you don't nee

[PHP] Pagination Optimization

2005-01-07 Thread Bruno B B Magalhães
My question is: Is there ANY way to speed up this function, or any way to fetch paginated results quicker? I had a project list, without pagination, and when I added the pagination function, it slowed down up to 0.0125 secs. Before it was runnin

Re: [PHP] GMT

2005-01-04 Thread Bruno B B Magalhães
efault_timezone_offset)) { $this->local_timezone_offset = $this->default_timezone_offset - $this->server_timezone_offset; return time()+3600*$this->local_timezone_offset; } else { return time(); } } =

[PHP] GMT

2005-01-04 Thread Bruno B B Magalhães
the hour. Regards, Bruno B B Magalhães -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Frameworks

2004-12-22 Thread Bruno B B Magalhães
tion class (lots of input validation) and its multilingual, fetched from the database. Best Regards, Bruno B B Magalhaes

Re: [PHP] Infinity and nested categories

2004-12-14 Thread Bruno B B Magalhães
Thanks Richard! Helped a lot! Regards, Bruno B B Magalhaes On Dec 13, 2004, at 4:16 PM, Richard Lynch wrote: Bruno B B Magalhães wrote: Hi again everybody, well, I've asked it before, but I couldn't work on this at all. As some knows I have a system witch has a category system. The gener

[PHP] Slow Zend Optimizer

2004-12-14 Thread Bruno B B Magalhães
Hi guys, I've installed the zend Optimizer with my Mac OS X, Apache 1.2, PHP5. And guess what, it became about 40% slower!!! My framework was running for example in the modules administration (admin area) at 0.104ms, and now the average is 0.2ms - 0.24ms Does anybody have any idea of what hell

[PHP] Infinity and nested categories

2004-12-12 Thread Bruno B B Magalhães
AND category_id='022') My problem is that how can I handle those categories! and build a three of it. I am using PHP5 and MySQL 4.1 Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Friendly URL

2004-12-11 Thread Bruno B B Magalhães
Richard, well a much simpler solution than my old one: $this->uri = explode('/',basename($_SERVER['SCRIPT_NAME']).$_SERVER['PATH_INFO']); Many thanks for your help, Bruno B B Magalhaes On Dec 10, 2004, at 11:57 PM, Richard Lynch wrote: $_SERVER['PHP_SE

[PHP] Not quite PHP, but related...

2004-12-10 Thread Bruno B B Magalhães
post, get, cookie and session headers. Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Friendly URL

2004-12-10 Thread Bruno B B Magalhães
] = strtolower(addslashes(strip_tags(eregi_replace($get_string,'',$path[$i]) ))); } else { $this->uri[$i] = strtolower(addslashes(strip_tags($path[$i]))); } } } Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Implementing database cache.

2004-12-08 Thread Bruno B B Magalhães
I am using mysql with cache results enable, but as every addicted I want more and more... course I have to benchmark it to see if its worth... Regards, Bruno B B Magalhães On Dec 8, 2004, at 8:34 PM, John Holmes wrote: Bruno B B Magalhães wrote: Hi again guys, does anybody have am idea of witch

[PHP] Implementing database cache.

2004-12-08 Thread Bruno B B Magalhães
query itself. I would love any ideas! :) Nice regards. Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Comment Speed

2004-11-27 Thread Bruno B B Magalhães
cess. Any idea? Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] identifying the country of the people who connect to web site / portal

2004-11-27 Thread Bruno B B Magalhães
Hi, course you can, you should search harder for it, but I will facilitate for you! :o) http://www.phpclasses.org/browse/package/1477.html Best Regards, Bruno B B Magalhães -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Lazy anwsers (WAS: mysql_connect vs mysql_pconnect)

2004-11-27 Thread Bruno B B Magalhães
) and I believe that others do too. So I think that this is the worst kind of comment or suggestion someone can receive. Sorry everybody. Regards, Bruno B B Magalhães -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to $_POST from a grid

2004-11-24 Thread Bruno B B Magalhães
g as foreach($modules as $module) { } our also a faster one for($i=0; $i < $t; $i++) { } where $t = count($modules)-1;. Best Regards, Bruno B B Magalhães -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is it a good idea?

2004-11-20 Thread Bruno B B Magalhães
} } elseif(!isset($this->core->$class)) { return $this->core->$class =& new $class($this); } else { return $this->core->$class; } } Best regards to you all, Bruno B

[PHP] Auto Class loading

2004-11-17 Thread Bruno B B Magalhães
le? Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: [PHP-DB] OOP vs Functions and includes

2004-11-16 Thread Bruno B B Magalhães
Here is a example of a controller of my framework, can you imagine it using procedural approach? (http://www.yourhostname.com/controller/articles) http://www.bbbm.com.br/ * @copyright 2004 Bruno B B Magalhaes * @author Bruno B B Magalhaes <[EMAIL PROTECTED]> * @package BBBM Framework *

Re: [PHP] Authentication Class

2004-11-16 Thread Bruno B B Magalhães
Is this good or bad? heheh! Regards, Bruno B B Magalhaes On Nov 16, 2004, at 3:31 PM, raditha dissanayake wrote: Bruno B B Magalhães wrote: Hi guys, well, I wrote a class for a big project (a framework), and here it is, I was wondering if someone have any suggestions regarding flexibility and

[PHP] Auto-load class if it doesn't exists!

2004-11-16 Thread Bruno B B Magalhães
.class.php'); $myclass = new class(); } Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Array unset

2004-11-16 Thread Bruno B B Magalhães
Hi, I my system can handle invisible modules, so they can't show in the menu but stills works... here is the code: $c = count($modules)-1; for($i = 0; $i <= $c; $i++) { if($modules[$i]['moduleVisibility'] == 0) { uns

[PHP] Authentication Class

2004-11-16 Thread Bruno B B Magalhães
table.. == http://www.bbbm.com.br/ * @copyright 2004 Bruno B B Magalhaes * @author Bruno B B Magalhaes <[EMAIL PROTECTED]> * @package BBBM Framework * @version 0.5dev */ class authentication { var $domain; var $database; var $authentica

Re: [PHP] Javascript and php

2004-11-07 Thread Bruno B B Magalhães
Reinhart, picture_url.'"'; if($i <= mysql_num_rows($result)-2) { echo ','; } } ?> Here is how I do in my developments. Regards, Bruno B B Magalhães On Nov 7, 2004, at 8:44 AM, Reinhart Viane wrote: Hey all, Hope some o

Re: [PHP] Re: keywords generation (ANOTHER)

2004-11-05 Thread Bruno B B Magalhães
Hi, I am trying to categorize the keywords... for example, if a word shows at the begin probably it´s more important, but how many occurrences is also important... Does someone knows Google´s formula? hehe This code is working more or less as expected! Many Thanks, Bruno ==

Re: [PHP] Re: keywords generation

2004-11-05 Thread Bruno B B Magalhães
at nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. '; echo generate_keywords($submited_text); ======== Than

Re: [PHP] Re: keywords generation

2004-11-05 Thread Bruno B B Magalhães
um] => 0 [zzril] => 1 [delenit] => 1 [ugue] => 1 [duis] => 1 [te] => 4 [fcilisi] => 0 ) Which is the word and it total occurrence in the text... Now I want to sort it from the highest values to the lowest... and then return a keyword string as: $k

[PHP] keywords generation

2004-11-05 Thread Bruno B B Magalhães
{ $total[$val] = substr_count($text,$val); } } } = How can I sort the resulting array by value, without loosing its relations. Is there a faster way of doing this? Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Syntax highlighting of odd language

2004-11-05 Thread Bruno B B Magalhães
-1; $i++) { $highlighted_code = eregi_replace($oddsyntax[$i],''.$oddsyntax[$i].'',$code); } return $code; } echo highlight_code($code); Regards, Bruno B B Magalhães On Nov 5, 2004, at 6:39 PM, Aaron Gould wrote: Could any of you privide some leads in regard to highlighting synt

Re: [PHP] enterprise php application automated testing

2004-10-23 Thread Bruno B B Magalhães
Well, we call it pre-testing, the only way, and the better one, is doing it with the future users of your system! Regards, Bruno B B Magalhães On Oct 23, 2004, at 10:00 PM, blackwater dev wrote: Hello all, I know I can use simpletest to test my application at the class level but I need a tool

Re: [PHP] PHP framework

2004-10-23 Thread Bruno B B Magalhães
then: http://www.zope.org http://www.fusebox.org http://www.mojavi.org http://www.binarycloud.com http://www.eZpublish.com http://amb.sourceforge.net http://www.phpmvc.net http://phrame.itsd.ttu.edu http://www.horde.org Best Regards, Bruno B B Magalhães On Oct 23, 2004, at 4:04 PM, Igor wrote: I need

Re: [PHP] Mixing classes

2004-10-20 Thread Bruno B B Magalhães
Hi Tomy, I did the same thing! I´ve used a class called framework to encapsulate everything... here is what looks like: framework.inc.php http://www.bbbm.com.br/ * @copyright 2004 Bruno B B Magalhaes * @author Bruno B B Magalhaes <[EMAIL PROTECTED]> * @package BBBM Framework * @version 0

Re: [PHP] Mixing classes

2004-10-20 Thread Bruno B B Magalhães
Hi Tomy, I did the same thing! I´ve used a class called framework to encapsulate everything... here is what looks like: framework.inc.php http://www.bbbm.com.br/ * @copyright 2004 Bruno B B Magalhaes * @author Bruno B B Magalhaes <[EMAIL PROTECTED]> * @package BBBM Framework * @version 0

[PHP] Reverse (or backward?) Infinity Loop

2004-10-19 Thread Bruno B B Magalhães
3 • Category 4 • Category 5 A reverse (or backward) loop! We need to get the last category and then follow the ParentId until the 0 ParentId. Have anybody made this before (I hope so)? Many Thanks, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Query Batch

2003-11-18 Thread b b
Jhon you mentioned that one may send a batch of queries with mysql_list? maybe I understood you wrong. I am translating an MS-SQL application into mysql/php. I need to be able to send a batch of queries all at once. For example: $qStr = " Insert into A(name, address) values('$name', '$address

Re: [PHP] Prefilled forms (solved)

2003-11-18 Thread b b
No I am saying that if you have: and you click submit then if you click back to see the form the value you set w2 will be blank. If you reverse the order however then you will see what you entered in w2 --- "John W. Holmes" <[EMAIL PROTECTED]> wrote: > b b wrote: >

[PHP] Prefilled forms (solved)

2003-11-18 Thread b b
Alright lets clean the slate here. I think we all mean well and that is what counts. I apologize if I offended anybody. Incidentally I can't quite explain the solution to my dillemma. The following is a description of the Problem and the Solution: Problem: I am running apache/php server. If

Re: [PHP]{OT} Prefilled forms

2003-11-18 Thread b b
am sending out personal emails to users when I was replying to a message sent to me. Again read and think before interfering. You really aren't helping much. In other words, mind your own ... --- John Nichel <[EMAIL PROTECTED]> wrote: > b b wrote: > > Some people don

Re: [PHP]{OT} Prefilled forms

2003-11-18 Thread b b
es your address (so that you get duplicate responses, 8 from this person so far) complains that you replied to the wrong version. And he does it in the general list. That is not right. --- John Nichel <[EMAIL PROTECTED]> wrote: > b b wrote: > > What??? > > You ahve sent me

RE: [PHP] Prefilled forms

2003-11-18 Thread b b
I haven't found a more elegant solution, > so if there is another > out there, I'd appreciate hearing about it. > > good luck, > > Warren Vail > > -Original Message- > From: Jay Blanchard > [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 18,

RE: [PHP]{OT} Prefilled forms

2003-11-18 Thread b b
What??? You ahve sent me like three private emails. You did reply all which sends me a private message and a message from the list. I replied to the one that had only your email address in it by mistake. mama mia --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > > Have you consulted an A

RE: [PHP] Prefilled forms

2003-11-18 Thread b b
The Problem again: I have a form, I fill it, click submit and then hit back. Usually in other sites I see the data that I attempted to submit. Forms originating from my site are coming up blank. In respnonse to your reply: I am using mozilla 5 or netscape 7. Same result in both. However, thi

RE: [PHP] Prefilled forms

2003-11-18 Thread b b
I don't think you understood my question. Off course you have to store data in a database or a session var if you want to retrieve them later on. My problem is not there. I hava a form, I click submit and right after that I hit back. Usually in most cases the form will be prefilled with what I

[PHP] Prefilled forms

2003-11-18 Thread b b
Hi there, I have installed linux/apache/php (again) recently on my machine. When I run an application off my server, fill out a form, submit it and then click back to edit some entries, the form comes up blank. This happen for apps running off my server only. Is it something with my php.ini, or

Re: [PHP] File Download?

2003-04-03 Thread b b
ual daFile). Cheers, r. --- Jason Wong <[EMAIL PROTECTED]> wrote: > On Friday 04 April 2003 13:51, b b wrote: > > > Why would the $daFile in the following code be > > resolved to "". I am passing it via the url. > > > session_start(); > >

[PHP] File Download?

2003-04-03 Thread b b
Hi, Why would the $daFile in the following code be resolved to "". I am passing it via the url. You are not autherized to view this page"); } ?> __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness,

[PHP] File download

2003-04-03 Thread b b
Hi, Anybody knows the solution to the following: I am trying to force the download of a file called dadada.txt. I have a file named downloadFile.php It is invoked like this: dadada.txt However within the downloadFile.php the $daFile argument is empty. This is the file: You are not a

[PHP] php and forms

2003-03-20 Thread b b
Hi, This could be a silly mistake or it could be a sign of configuratin problems. Simply put, my submitted form variables are not reaching the recieving end: A form: A recieving file testForm.php: testVar is : %s", $testVar); ?> When entering value like testtest in the form e

[PHP] rename failes if file name contains single quotes

2003-01-31 Thread $B%X!<%s(B $B%H!<%^%9(B
___ (BDo You Yahoo!? (BYahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php

[PHP] problems creating php extension

2002-03-12 Thread Cristóvão B. B. Dalla Costa
Hi I'm currently working on a proprietary application server being used within my company. It uses a proprietary protocol over TCP/IP to interface to remote clients and we currently use an extension I made for PHP 4.0.6. The problems came when we upgraded to PHP 4.1.x. We could compile our modul