[PHP] PHP Application Structre

2010-05-10 Thread Alex Major
Greetings all, This question basically surrounds how you structure your PHP applications, whether it changes depending on what you're doing and which you'd favour. I have a feeling it'll come down to a question of personal taste, but on the off-chance there's a best practice I'll ask anyways.

RE: [PHP] PHP Application Structre

2010-05-10 Thread Arno Kuhl
-Original Message- From: Alex Major [mailto:p...@allydm.co.uk] Sent: 10 May 2010 12:39 PM >From what I've seen and used, there seem to be three distinct ways of going about it. 1) Using a 'core' class which has a request handler in it. All pages in the site are accessed through that

Re: [PHP] PHP Encoder like IonCube

2010-05-10 Thread Ashley Sheridan
On Mon, 2010-05-10 at 12:42 +0600, shiplu wrote: > On Mon, May 10, 2010 at 6:28 AM, donald sullivan wrote: > > bcompiler is available, but with the correct tools data can still be > > extracted. > > http://php.net/manual/en/book.bcompiler.php > > > Its not a problem if data can still be extracte

Re: [PHP] PHP Encoder like IonCube

2010-05-10 Thread Peter Lind
On 10 May 2010 13:25, Ashley Sheridan wrote: > On Mon, 2010-05-10 at 12:42 +0600, shiplu wrote: > >> On Mon, May 10, 2010 at 6:28 AM, donald sullivan wrote: >> > bcompiler is available, but with the correct tools data can still be >> > extracted. >> > http://php.net/manual/en/book.bcompiler.php

[PHP] Re: PHP Encoder like IonCube

2010-05-10 Thread shiplu
Hello Ashley, My application will not be accessible through Internet. Users will use it through internal network. And internet is strictly prohibited there. Thats the reason why i'm lookin for such solution. On 5/10/10, Ashley Sheridan wrote: > On Mon, 2010-05-10 at 12:42 +0600, shiplu wrote: >

Re: [PHP] PHP Encoder like IonCube

2010-05-10 Thread Phpster
On May 10, 2010, at 7:36 AM, Peter Lind wrote: On 10 May 2010 13:25, Ashley Sheridan wrote: On Mon, 2010-05-10 at 12:42 +0600, shiplu wrote: On Mon, May 10, 2010 at 6:28 AM, donald sullivan wrote: bcompiler is available, but with the correct tools data can still be extracted. http:/

RE: [PHP] PHP Application Structre

2010-05-10 Thread Ashley Sheridan
On Mon, 2010-05-10 at 13:15 +0200, Arno Kuhl wrote: > -Original Message- > From: Alex Major [mailto:p...@allydm.co.uk] > Sent: 10 May 2010 12:39 PM > > From what I've seen and used, there seem to be three distinct ways of going > about it. > > 1) Using a 'core' class which has a re

[PHP] Re: PHP Encoder like IonCube

2010-05-10 Thread Ashley Sheridan
On Mon, 2010-05-10 at 17:51 +0600, shiplu wrote: > Hello Ashley, > My application will not be accessible through Internet. Users will > use it through internal network. And internet is strictly prohibited > there. Thats the reason why i'm lookin for such solution. > > On 5/10/10, Ashley Sheridan

Re: [PHP] PHP Application Structre

2010-05-10 Thread Peter Lind
On 10 May 2010 13:58, Ashley Sheridan wrote: > On Mon, 2010-05-10 at 13:15 +0200, Arno Kuhl wrote: > >> -Original Message- >> From: Alex Major [mailto:p...@allydm.co.uk] >> Sent: 10 May 2010 12:39 PM >> >> From what I've seen and used, there seem to be three distinct ways of going >> about

RE: [PHP] PHP Application Structre

2010-05-10 Thread Arno Kuhl
_ From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: 10 May 2010 01:58 PM To: a...@dotcontent.net Cc: 'Alex Major'; 'php-general General List' Subject: RE: [PHP] PHP Application Structre On Mon, 2010-05-10 at 13:15 +0200, Arno Kuhl wrote: -Original Message- From:

Re: [PHP] xpath help

2010-05-10 Thread Gary .
On 5/9/10, Peter Lind wrote: > On 9 May 2010 10:31, Gary wrote: >> If I have a document containing, say: >> ... >> >> How do I get at "bar2"? I tried everything, based on an xpath from >> Firebug (Firefox plugin), but kept getting NULL. >> > > try //table//font - that should give you all the font

[PHP] -----json and php----help

2010-05-10 Thread shahrzad khorrami
hi dears, I have a json file. I want to access some fileds of this json file only and can add some fields to it also... I couldn't find any thing in www, json api ! is there any function to get specific data from json file or add function that can add something in somewhere in this json file or cr

[PHP] Re: PHP Application Structre

2010-05-10 Thread Al
On 5/10/2010 6:39 AM, Alex Major wrote: Greetings all, This question basically surrounds how you structure your PHP applications, whether it changes depending on what you're doing and which you'd favour. I have a feeling it'll come down to a question of personal taste, but on the off-chance

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Ashley Sheridan
> > 3} Unless the site is small and has few pages and applications, it is almost > impossible to maintain. > I disagree here. As long as there are useful naming conventions for all of the files (I've seen projects where files have been named 1.php, 2.php, etc. I wanted to bloody kill the deve

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Paul M Foster
On Mon, May 10, 2010 at 05:17:16PM +0100, Ashley Sheridan wrote: > > > > > > 3} Unless the site is small and has few pages and applications, it > is almost > > impossible to maintain. > > > > I disagree here. As long as there are useful naming conventions for all > of the files (I've seen proje

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Al
On 5/10/2010 12:17 PM, Ashley Sheridan wrote: 3} Unless the site is small and has few pages and applications, it is almost impossible to maintain. I disagree here. As long as there are useful naming conventions for all of the files (I've seen projects where files have been named 1.php, 2

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Peter Lind
On 10 May 2010 18:17, Ashley Sheridan wrote: > > >> >> 3} Unless the site is small and has few pages and applications, it is almost >> impossible to maintain. >> > > I disagree here. As long as there are useful naming conventions for all > of the files (I've seen projects where files have been nam

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread richard gray
On 10/05/2010 18:17, Ashley Sheridan wrote: It makes sense sometimes to have different files for different sections of a website. For example, blog.php, gallery.php, cart.php could deal with the blog, gallery and shopping cart sections for an artists website. Yes, it could all be achieved with on

[PHP] How to get input from socket client

2010-05-10 Thread Ryan Sun
Stream and networking programming seems like a rock on the way to ZCE for most people, so I'm learning some socket examples before I sit in the room for exam. Here is the script for server http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How to get input from socket client

2010-05-10 Thread Bob McConnell
From: Ryan Sun > Stream and networking programming seems like a rock on the way to > ZCE for most people, so I'm learning some socket examples before I sit > in the room for exam. > Here is the script for server > server&client hangs after output and time out later. > > Can any1 point out wh

[PHP] PHP Image Host - Sending HTTP Headers Twice?

2010-05-10 Thread APseudoUtopia
I have a php script which serves an image. It's very simple: header('Content-Type: image/' . $ImageData['content_type']); readfile($File); When viewing the script with the Firefox Extension: LiveHTTPHeaders, it gives the following output for a SINGLE request:

Re: [PHP] simplexml choking on apparently valid XML - Solved

2010-05-10 Thread Brian Dunning
I was able to resolve this by changing the XML file encoding from UTF-8 to ISO-8859-1. Works like a charm now, with the XML-encoded characters. Thanks to all who offered their help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread David McGlone
On Monday 10 May 2010 13:04:36 richard gray wrote: > On 10/05/2010 18:17, Ashley Sheridan wrote: > > It makes sense sometimes to have different files for different sections > > of a website. For example, blog.php, gallery.php, cart.php could deal > > with the blog, gallery and shopping cart section

[PHP] regexp questions

2010-05-10 Thread Spud. Ivan.
Hi, I've recently changed from php 5.1 to 5.3.2 and I'm havong problems with preg_match, because the same regular expressions used in php 5.1 are not matching anything in 5.3.2. There are any significant changes that I should know? I've been searching but I haven't found anything. Thanks.

Re: [PHP] regexp questions

2010-05-10 Thread shiplu
For example, the following regex doesn't work. return (bool) preg_match('/^[\pL\pN\pZ\p{Pc}\p{Pd}\p{Po}]++$/uD', (string) $str); Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguis

[PHP] php path and relink

2010-05-10 Thread Augusto Flavio
Hi, I have a shell account with limited access. The php cli version installated is 4.4.6. But the server have also the php 5.2.6. I checked the php version and i got this: $ php -v PHP 4.4.9 (cli) (built: Sep 17 2008 11:04:03) . But i want that the php command be a link to the php5. How c

RE: [PHP] regexp questions

2010-05-10 Thread Spud. Ivan.
Is there any place where to read the changelog or something? Thanks. >>> For example, the following regex doesn't work. return (bool) preg_match('/^[\pL\pN\pZ\p{Pc}\p{Pd}\p{Po}]++$/uD', (string) $str); Shiplu Mokadd.im ___

Re: [PHP] php path and relink

2010-05-10 Thread Ashley Sheridan
On Mon, 2010-05-10 at 21:23 -0300, Augusto Flavio wrote: > Hi, > > > I have a shell account with limited access. The php cli version installated > is 4.4.6. But the server have also the php 5.2.6. I checked the php version > and i got this: > > > $ php -v > PHP 4.4.9 (cli) (built: Sep 17 2008

RE: [PHP] php path and relink

2010-05-10 Thread Spud. Ivan.
do strace php -v and see what's the path for the old version. It'd be better if you uninstall the old version, but it you don't know how was it installed, simply remove the old php binary or overwrite it with newer. I. Lopez. Hi, I have a shell account with limited access. The php c

RE: [PHP] php path and relink

2010-05-10 Thread Spud. Ivan.
then try different paths to locate the version you want: /usr/bin/php /usr/local/bin/php /usr/sbin/php etc etc I don't have root permission to unistall the old version or remove the link or create a link in /usr/loca/bin/php I'm just call the php -v command and get the version 4. T

Re: [PHP] php path and relink

2010-05-10 Thread Augusto Flavio
I did it: .bash_profile PATH=/usr/local/php5/bin:$PATH export PATH worked well Thanks

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Paul M Foster
On Mon, May 10, 2010 at 06:09:00PM -0400, David McGlone wrote: > On Monday 10 May 2010 13:04:36 richard gray wrote: > > On 10/05/2010 18:17, Ashley Sheridan wrote: > > > It makes sense sometimes to have different files for different sections > > > of a website. For example, blog.php, gallery.php,

Re: [PHP] PHP Application Structre

2010-05-10 Thread chetan rane
Hi all, mod rewrite was actually inrduced to have search engne frendly urls. hnce if you want a seo site then you have to use options 1 & 2. using smarty or any templating engine for readibility is not total true. one of the major advantages of using template engines is caching On 5/11/10, David

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread David McGlone
On Monday 10 May 2010 22:15:44 Paul M Foster wrote: > On Mon, May 10, 2010 at 06:09:00PM -0400, David McGlone wrote: > > On Monday 10 May 2010 13:04:36 richard gray wrote: > > > On 10/05/2010 18:17, Ashley Sheridan wrote: > > > > It makes sense sometimes to have different files for different > > >

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Robert Cummings
Paul M Foster wrote: On Mon, May 10, 2010 at 06:09:00PM -0400, David McGlone wrote: On Monday 10 May 2010 13:04:36 richard gray wrote: On 10/05/2010 18:17, Ashley Sheridan wrote: It makes sense sometimes to have different files for different sections of a website. For example, blog.php, galle

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Paul M Foster
On Mon, May 10, 2010 at 11:37:21PM -0400, Robert Cummings wrote: > Paul M Foster wrote: >> >> Lots of people use templating systems and particularly Smarty. Here's >> the difference between a templating system and just hand-coding: >> >> Hand coding-- >> >> >> >> Templating system: >> >> >> >

Re: [PHP] Re: PHP Application Structre

2010-05-10 Thread Robert Cummings
Paul M Foster wrote: On Mon, May 10, 2010 at 11:37:21PM -0400, Robert Cummings wrote: Paul M Foster wrote: Lots of people use templating systems and particularly Smarty. Here's the difference between a templating system and just hand-coding: Hand coding-- Templating system: (Okay, I