[PHP] Example of good PHP namespace usage?

2010-03-19 Thread D. Dante Lorenso
All, I want to start using PHP namespaces for my projects. Currently, I name my classes similar to how Zend Framework names theirs and I end up with classes like: LS_Util_String I'm thinking that if I converted this to namespaces, the classes would be named like: LS\Util\String I'd

Re: [PHP] web sniffer

2010-03-19 Thread Jochen Schultz
Btw., when you use file_get_contets, is there a good way to tell the script to stop recieving the file after let's say 2 seconds - just in case the server is not reachable - to avoid using fsockopen? regards Jochen madunix schrieb: okay ..it works now i use http://www.my.com";); echo $data; ?

Re: [PHP] web sniffer

2010-03-19 Thread Peter Lind
You should be able to do that by setting context options: http://www.php.net/manual/en/context.http.php On 19 March 2010 08:53, Jochen Schultz wrote: > Btw., when you use file_get_contets, is there a good way to tell the script > to stop recieving the file after let's say 2 seconds - just in case

Re: [PHP] web sniffer

2010-03-19 Thread madunix
can any one give a complete sample script how to retrieve data content from web (jpg, pdf, field). Thanks On Fri, Mar 19, 2010 at 9:53 AM, Jochen Schultz wrote: > Btw., when you use file_get_contets, is there a good way to tell the script > to stop recieving the file after let's say 2 seconds -

Re: [PHP] Re: PHP in HTML code

2010-03-19 Thread Michael A. Peters
Jan G.B. wrote: 2010/3/18 tedd : Calling it "ranting" or "religious" unjustly demeans the discussion and is inflammatory. In all of this, I've simply said it's your choice. What I said was: *persons ranting about short open tags* *are just like some religious people * I don't care what peopl

Re: [PHP] Re: PHP in HTML code

2010-03-19 Thread Peter Lind
On 19 March 2010 10:17, Michael A. Peters wrote: > > I don't care what people do in their code. > I do not like released code with short tags, it has caused me problems when > trying to run php webapps that use short tags, I have to go through the code > and change them. > > So what people do with

RE: [PHP] web sniffer

2010-03-19 Thread Jay Blanchard
[snip] can any one give a complete sample script how to retrieve data content from web (jpg, pdf, field). [/snip] Your question is a little too far reaching. You can use string functions match portions of strings including tried and true regular expressions. What do you want to do, specifically?

RE: [PHP] web sniffer

2010-03-19 Thread Ashley Sheridan
On Fri, 2010-03-19 at 06:25 -0500, Jay Blanchard wrote: > [snip] > can any one give a complete sample script how to retrieve data content > from web (jpg, pdf, field). > [/snip] > > Your question is a little too far reaching. You can use string functions > match portions of strings including trie

Re: [PHP] web sniffer

2010-03-19 Thread Jochen Schultz
Maybe this code may help you getting into it? public function sendHttpRequest($host,$filename,$port=80,$timeout=1,$x=0,$result=array()) { $header = 'GET /'.$filename.' HTTP/1.1'.PHP_EOL; $header .= 'Host: '.$host.PHP_EOL; $header .= 'Connection: close'.PHP_EOL; $header .= 'Us

Re: [PHP] web sniffer

2010-03-19 Thread Jochen Schultz
Thanks alot! regards Jochen Peter Lind schrieb: You should be able to do that by setting context options: http://www.php.net/manual/en/context.http.php On 19 March 2010 08:53, Jochen Schultz wrote: Btw., when you use file_get_contets, is there a good way to tell the script to stop recieving

Re: [PHP] web sniffer

2010-03-19 Thread Rene Veerman
"field"? On Fri, Mar 19, 2010 at 9:46 AM, madunix wrote: > can any one give a complete sample script how to retrieve data content > from web (jpg, pdf, field). > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Robert P. J. Day
(just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm looking at some existing PHP code that accesses a mysql 5.0 db, and it's coded using the mysql-specific calls: mysql_connect, mysql_select_db, etc, etc. is there any reas

[PHP] need a free sql table layout diagram app for linux, not phpmyadmin coz it has a bug with >7 tables opened in its designer.

2010-03-19 Thread Rene Veerman
https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/541922 phpmyadmin is on strike :( can anyone recommend a good alternative? auto-scaling print function preferred. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Ashley Sheridan
On Fri, 2010-03-19 at 10:17 -0400, Robert P. J. Day wrote: > (just a warning -- as a relative newbie to PHP, i'll probably have > the occasional dumb question. just humour me.) > > i'm looking at some existing PHP code that accesses a mysql 5.0 db, > and it's coded using the mysql-specific cal

Re: [PHP] need a free sql table layout diagram app for linux, not phpmyadmin coz it has a bug with >7 tables opened in its designer.

2010-03-19 Thread Ashley Sheridan
On Fri, 2010-03-19 at 15:25 +0100, Rene Veerman wrote: > https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/541922 > > phpmyadmin is on strike :( > > can anyone recommend a good alternative? auto-scaling print function > preferred. > I needed software to do this a while ago, and the m

Re: [PHP] Example of good PHP namespace usage?

2010-03-19 Thread Adam Richardson
On Fri, Mar 19, 2010 at 3:05 AM, D. Dante Lorenso wrote: > All, > > I want to start using PHP namespaces for my projects. Currently, I name my > classes similar to how Zend Framework names theirs and I end up with classes > like: > > LS_Util_String > > I'm thinking that if I converted this to n

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Paul M Foster
On Fri, Mar 19, 2010 at 02:23:30PM +, Ashley Sheridan wrote: > On Fri, 2010-03-19 at 10:17 -0400, Robert P. J. Day wrote: > > > (just a warning -- as a relative newbie to PHP, i'll probably have > > the occasional dumb question. just humour me.) > > > > i'm looking at some existing PHP cod

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Adam Richardson
On Fri, Mar 19, 2010 at 10:23 AM, Ashley Sheridan wrote: > On Fri, 2010-03-19 at 10:17 -0400, Robert P. J. Day wrote: > > > (just a warning -- as a relative newbie to PHP, i'll probably have > > the occasional dumb question. just humour me.) > > > > i'm looking at some existing PHP code that ac

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Rene Veerman
another option: adodb.sf.net. and yep, i'm fully for using a db abstraction layer. On Fri, Mar 19, 2010 at 3:17 PM, Robert P. J. Day wrote: > >  (just a warning -- as a relative newbie to PHP, i'll probably have > the occasional dumb question.  just humour me.) > >  i'm looking at some existing

Re: [PHP] need a free sql table layout diagram app for linux, not phpmyadmin coz it has a bug with >7 tables opened in its designer.

2010-03-19 Thread Rene Veerman
thanks. On Fri, Mar 19, 2010 at 3:35 PM, Ashley Sheridan wrote: > On Fri, 2010-03-19 at 15:25 +0100, Rene Veerman wrote: > > https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/541922 > > phpmyadmin is on strike :( > > can anyone recommend a good alternative? auto-scaling print function >

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Nilesh Govindarajan
On 03/19/2010 08:51 PM, Rene Veerman wrote: another option: adodb.sf.net. and yep, i'm fully for using a db abstraction layer. On Fri, Mar 19, 2010 at 3:17 PM, Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just hu

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread la...@garfieldtech.com
Add me to the list of people recommending PDO. It's much nicer to work with than the ext/mysql API, and frankly more secure since you get prepared statements. It won't get you complete database independence for a number of reasons (mostly due to databases being too unstandardized because they

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Mattias Thorslund
Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm looking at some existing PHP code that accesses a mysql 5.0 db, and it's coded using the mysql-specific calls: mysql_connect, mysql_select_db, etc,

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Lester Caine
la...@garfieldtech.com wrote: Add me to the list of people recommending PDO. It's much nicer to work with than the ext/mysql API, and frankly more secure since you get prepared statements. It won't get you complete database independence for a number of reasons (mostly due to databases being too

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Robert P. J. Day
On Fri, 19 Mar 2010, Mattias Thorslund wrote: > Robert P. J. Day wrote: > > (just a warning -- as a relative newbie to PHP, i'll probably have > > the occasional dumb question. just humour me.) > > > > i'm looking at some existing PHP code that accesses a mysql 5.0 db, > > and it's coded usin

[PHP] Event/Exhibition Organizers Management Software

2010-03-19 Thread Jochem Maas
hi gang[tm], I've been STFW for some kind of CRM package specifically geared at event/exhibition organizers. I'm not having any luck, there *seems* to be stuff out there but most of it's geared at single exhibitor/corporate entity event management as opposed to the organization of events where 100

[PHP] where to make observations about current PHP manual?

2010-03-19 Thread Robert P. J. Day
i don't see a separate mailing list for documentation so is this where i would point at oddities in the manual? as in, here: http://www.php.net/manual/en/language.variables.external.php we read: "// Unavailable since PHP 6." that just looks weird, no? rday -- ==

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Michael A. Peters
Mattias Thorslund wrote: Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm looking at some existing PHP code that accesses a mysql 5.0 db, and it's coded using the mysql-specific calls: mysql_conne

[PHP] php compile / configure options

2010-03-19 Thread Gregory Machin
Hi I'm setting up a development environment that runs multiple versions of php. I'm looking a list of the compile option options for each php release other than "./configure --help" with more detail on what each option does. Any suggestions welcome . Thank you. -- PHP General Mailing List (http:

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-19 Thread Jason Pruim
On Mar 18, 2010, at 1:26 PM, Andrew Ballard wrote: On Thu, Mar 18, 2010 at 1:00 PM, Ashley Sheridan wrote: [snip] And I believe that when MS Office saves a CSV out with a character other than a comma as the delimiter, it still saves it as a .csv by default. Nope. If you save as CSV, it i

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-19 Thread Ashley Sheridan
On Fri, 2010-03-19 at 18:01 -0400, Jason Pruim wrote: > On Mar 18, 2010, at 1:26 PM, Andrew Ballard wrote: > > > On Thu, Mar 18, 2010 at 1:00 PM, Ashley Sheridan > > wrote: > > [snip] > >> And I believe that when MS Office saves a CSV out with a character > >> other > >> than a comma as the de

[PHP] Re: where to make observations about current PHP manual?

2010-03-19 Thread Shawn McKenzie
Robert P. J. Day wrote: > i don't see a separate mailing list for documentation so is this > where i would point at oddities in the manual? as in, here: > > http://www.php.net/manual/en/language.variables.external.php > > we read: > > "// Unavailable since PHP 6." > > that just looks weird, n

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-19 Thread Andrew Ballard
On Fri, Mar 19, 2010 at 6:01 PM, Jason Pruim wrote: > > On Mar 18, 2010, at 1:26 PM, Andrew Ballard wrote: > >> On Thu, Mar 18, 2010 at 1:00 PM, Ashley Sheridan >> wrote: >> [snip] >>> >>> And I believe that when MS Office saves a CSV out with a character other >>> than a comma as the delimiter,

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-19 Thread Andrew Ballard
On Fri, Mar 19, 2010 at 6:13 PM, Ashley Sheridan wrote: > > On Fri, 2010-03-19 at 18:01 -0400, Jason Pruim wrote: > > On Mar 18, 2010, at 1:26 PM, Andrew Ballard wrote: > > > On Thu, Mar 18, 2010 at 1:00 PM, Ashley Sheridan > > wrote: > > [snip] > >> And I believe that when MS Office saves a CSV

[PHP] Re: where to make observations about current PHP manual?

2010-03-19 Thread Robert P. J. Day
On Fri, 19 Mar 2010, Shawn McKenzie wrote: > Robert P. J. Day wrote: > > i don't see a separate mailing list for documentation so is this > > where i would point at oddities in the manual? as in, here: > > > > http://www.php.net/manual/en/language.variables.external.php > > > > we read: > > > >

Re: [PHP] where to make observations about current PHP manual?

2010-03-19 Thread Daniel Brown
On Fri, Mar 19, 2010 at 16:59, Robert P. J. Day wrote: > >  i don't see a separate mailing list for documentation so is this > where i would point at oddities in the manual?  as in, here: > > http://www.php.net/manual/en/language.variables.external.php > > we read: > > "// Unavailable since PHP 6.

Re: [PHP] Re: where to make observations about current PHP manual?

2010-03-19 Thread Daniel Brown
On Fri, Mar 19, 2010 at 20:57, Robert P. J. Day wrote: > >  i'm not sure that addresses my post -- it doesn't make grammatical > sense to state that something is unavailable "since" something that is > yet to be officially released. In most cases, you'd be absolutely correct but PHP is a

Re: [PHP] where to make observations about current PHP manual?

2010-03-19 Thread Daniel Brown
On Fri, Mar 19, 2010 at 21:04, Daniel Brown wrote: > >    Indeed.  It would probably be better to read, "Unavailable as of > PHP 6."  I'll patch that in the XML sources now, and the next time the > manual rebuilds, the changes will take effect. Future builds will appear as hinted in the follo

Fwd: Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Nilesh Govindarajan
On 03/20/2010 02:31 AM, Michael A. Peters wrote: Mattias Thorslund wrote: Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm looking at some existing PHP code that accesses a mysql 5.0 db, and it's coded

Fwd: Re: [PHP] php compile / configure options

2010-03-19 Thread Nilesh Govindarajan
On 03/20/2010 03:16 AM, Gregory Machin wrote: Hi I'm setting up a development environment that runs multiple versions of php. I'm looking a list of the compile option options for each php release other than "./configure --help" with more detail on what each option does. Any suggestions welcome .

Re: Fwd: Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Michael A. Peters
Nilesh Govindarajan wrote: On 03/20/2010 02:31 AM, Michael A. Peters wrote: Mattias Thorslund wrote: Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm looking at some existing PHP code that accesses a

Re: Fwd: Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Nilesh Govindarajan
On 03/20/2010 07:50 AM, Michael A. Peters wrote: Nilesh Govindarajan wrote: On 03/20/2010 02:31 AM, Michael A. Peters wrote: Mattias Thorslund wrote: Robert P. J. Day wrote: (just a warning -- as a relative newbie to PHP, i'll probably have the occasional dumb question. just humour me.) i'm

Re: [PHP] php compile / configure options

2010-03-19 Thread Simon J Welsh
On 20/03/2010, at 10:46 AM, Gregory Machin wrote: > Hi > I'm setting up a development environment that runs multiple versions of php. > I'm looking a list of the compile option options for each php release > other than "./configure --help" with more detail on what each option > does. > Any suggest

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-19 Thread Paul M Foster
On Fri, Mar 19, 2010 at 10:13:54PM +, Ashley Sheridan wrote: > > It's not really just that. In the csv format, a field value of 00123 (I don't > really know what zip code formats are) is perfectly valid. ZIP codes are simply five digits. The starting digit (0-9) identifies a broad region

Re: [PHP] Spreadsheet_Excel_Reader problem

2010-03-19 Thread Paul M Foster
On Fri, Mar 19, 2010 at 06:01:38PM -0400, Jason Pruim wrote: > > But if you have a decent CASS software then it should add the zip back > in hehe :) For the sake of those in Europe and elsewhere, CASS software is software certified by the US Postal Service which cleans up addresses to conform t