Re: [PHP] Best way to create an image with flowing text?

2011-06-17 Thread Richard Quadling
On 16 June 2011 23:59, Brian Dunning br...@briandunning.com wrote: Hey all - I need to create PNG images with transparent backgrounds that contain text. The text will come from four fields in a database, and needs to be centered, and text wrapped. The fields are going to be of varying

[PHP] Best way to create an image with flowing text?

2011-06-16 Thread Brian Dunning
Hey all - I need to create PNG images with transparent backgrounds that contain text. The text will come from four fields in a database, and needs to be centered, and text wrapped. The fields are going to be of varying lengths, so each block of text (which will be shown in a different font

Re: [PHP] best way to determine mime type of file these days?

2010-03-18 Thread Per Jessen
Robert P. J. Day wrote: i realize it sounds trivial but the online info is annoyingly recursive. there's mime_content_type(), but it's officially deprecated. On the manual page there is a reference to the Fileinfo PECL extension: http://php/manual/en/ref.fileinfo.php -- Per Jessen,

Re: [PHP] best way to determine mime type of file these days?

2010-03-18 Thread tedd
At 8:52 AM +0100 3/18/10, Per Jessen wrote: Robert P. J. Day wrote: i realize it sounds trivial but the online info is annoyingly recursive. there's mime_content_type(), but it's officially deprecated. On the manual page there is a reference to the Fileinfo PECL extension:

Re: [PHP] best way to determine mime type of file these days?

2010-03-18 Thread Per Jessen
tedd wrote: At 8:52 AM +0100 3/18/10, Per Jessen wrote: Robert P. J. Day wrote: i realize it sounds trivial but the online info is annoyingly recursive. there's mime_content_type(), but it's officially deprecated. On the manual page there is a reference to the Fileinfo PECL

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Robert P. J. Day
On Tue, 16 Mar 2010, John Black wrote: On 03/16/2010 06:57 PM, Robert P. J. Day wrote: i have a project (let's call it proj) which lives in the proj directory and which contains several subdirs, some of which might contain their own subdirs and so on. some of those subdirs might

RE: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Bob McConnell
From: Robert P. J. Day On Tue, 16 Mar 2010, John Black wrote: On 03/16/2010 06:57 PM, Robert P. J. Day wrote: i have a project (let's call it proj) which lives in the proj directory and which contains several subdirs, some of which might contain their own subdirs and so on. some of

RE: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Robert P. J. Day
On Wed, 17 Mar 2010, Bob McConnell wrote: ... snip ... IOW, you want to point into the first project's test directory from other projects when you can't know the relative paths between those projects? I suspect you will have to manage that on a machine by machine basis, unless you can

RE: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Robert P. J. Day
On Wed, 17 Mar 2010, Bob McConnell wrote: I suspect you will have to manage that on a machine by machine basis, unless you can convince the entire development team to create a common directory structure that encompasses all projects. i'm not sure what you mean by the above. while that

RE: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Teus Benschop
let me emphasize that the layout of the entire proj directory will be consistent across all users and all machines since it will represent a single SVN checkout, so that's not an issue. of course, anyone will be free to check it out anywhere they want but once they do, its structure will be

[PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread Robert P. J. Day
i have a project (let's call it proj) which lives in the proj directory and which contains several subdirs, some of which might contain their own subdirs and so on. some of those subdirs might contain utility classes that i want to include or require elsewhere, so i want to be able to just:

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread John Black
On 03/16/2010 06:57 PM, Robert P. J. Day wrote: i have a project (let's call it proj) which lives in the proj directory and which contains several subdirs, some of which might contain their own subdirs and so on. some of those subdirs might contain utility classes that i want to include or

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread John Black
On 03/16/2010 08:50 PM, John Black wrote: So I just set $include = './include/abc/def/' at the top of the correction, I set $include to the relative path of the include directory and then use it like this: $include = '../../include/'; require $include.'abc/file1.php'; require_once

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread Ryan Sun
On Tue, Mar 16, 2010 at 1:57 PM, Robert P. J. Day rpj...@crashcourse.ca wrote: and all PHP scripts would start off with something like: set_include_path(get_include_path() . PATH_SEPARATOR . getenv('PROJ_DIR')); just utilize include_path directive in php.ini -- PHP General Mailing List

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread Rene Veerman
On Tue, Mar 16, 2010 at 9:48 PM, Ryan Sun ryansu...@gmail.com wrote: just utilize include_path directive in php.ini yea, or via ini_set('include_path', ); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] best way to determine (MIME) content type of a stream ofbytes?

2010-03-09 Thread Auke van Slooten
Robert P. J. Day wrote: On Mon, 8 Mar 2010, Ashley Sheridan wrote: What about writing the first n bytes to a file and then passing that to the command line? I'm assuming a Linux server here, but it should do the trick. gah! i was hoping for something that wouldn't make me want to

[PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Robert P. J. Day
hi, i'm interested in the most comprehensive way to determine the content type of a stream of bytes that's been uploaded to a PHP script? assuming that the bytes are uploaded simply via a POST parameter, i can see that there are a couple ways to do it: * getimagesize() * FileInfo i've

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Ashley Sheridan
On Mon, 2010-03-08 at 10:57 -0500, Robert P. J. Day wrote: hi, i'm interested in the most comprehensive way to determine the content type of a stream of bytes that's been uploaded to a PHP script? assuming that the bytes are uploaded simply via a POST parameter, i can see that there are a

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Robert P. J. Day
On Mon, 8 Mar 2010, Ashley Sheridan wrote: On Mon, 2010-03-08 at 10:57 -0500, Robert P. J. Day wrote: hi, i'm interested in the most comprehensive way to determine the content type of a stream of bytes that's been uploaded to a PHP script? assuming that the bytes are uploaded simply via

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Ashley Sheridan
On Mon, 2010-03-08 at 11:33 -0500, Robert P. J. Day wrote: On Mon, 8 Mar 2010, Ashley Sheridan wrote: On Mon, 2010-03-08 at 10:57 -0500, Robert P. J. Day wrote: hi, i'm interested in the most comprehensive way to determine the content type of a stream of bytes that's been uploaded to

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Robert P. J. Day
On Mon, 8 Mar 2010, Ashley Sheridan wrote: What about writing the first n bytes to a file and then passing that to the command line? I'm assuming a Linux server here, but it should do the trick. gah! i was hoping for something that wouldn't make me want to gouge out my eyes with a

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Ashley Sheridan
On Mon, 2010-03-08 at 11:37 -0500, Robert P. J. Day wrote: On Mon, 8 Mar 2010, Ashley Sheridan wrote: What about writing the first n bytes to a file and then passing that to the command line? I'm assuming a Linux server here, but it should do the trick. gah! i was hoping for

Re: [PHP] Best way to read first 20 characters of a string?

2009-12-02 Thread Daniel Brown
On Wed, Dec 2, 2009 at 10:11, Chris Payne chris_pa...@danmangames.com wrote: Hi everyone, I'm pulling data from a mysql database, but need only the first 20 characters of each string for a short description, what is the best method to just grab the first 20 characters from a string regardless

[PHP] Best way to test for form submission?

2009-08-28 Thread Adam Jimerson
This question might give away the fact that I am a php noob, but I am looking for the best way to test for form submission in PHP. I know in Perl this can be done with if (param) but I don't know if that will work with PHP. I have read the Learning PHP 5 book and the only thing that was

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-07 Thread Michael A. Peters
Govinda wrote: I want something that will work for calling an include from any file that lives n levels deep. That's where you have to define a variable (or constant) that tells the system where the web root is located, and then use that to determine where you are in relation to that. For

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Kim N. Lesmer
On Sun, 5 Jul 2009 14:33:07 -0600 Govinda govinda.webdnat...@gmail.com wrote: I am confusing myself reading the docs just now. i.e.: include_path basename() and dirname() I had thought from many months ago that ?php include '/somedir/somefile.php'; ? would include somefile.php

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
On Jul 5, 2009, at 4:42 PM, Kim N. Lesmer wrote: Like Michael said there is more than one way to deal with this. I personally prefer to use this: require_once ($_SERVER['DOCUMENT_ROOT'] . /incl/myfile.php); Unless the file needs to be kept outside of where the webserver serves files. Kim,

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 11:04, Govindagovinda.webdnat...@gmail.com wrote: Kim, this is exactly what I was looking for.  I had been over $_SERVER in the docs..  but somehow missed that basic obvious param.  Thanks! And now I'll throw a monkey wrench into the gears and tell you that, yes, it

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Michael Shadle
On Mon, Jul 6, 2009 at 8:24 AM, Daniel Brownparas...@gmail.com wrote:    Conversely, using the code example from above (and building upon it), we know that __FILE__ remains static regardless of the point of the call.  Thus, it's a better and more reliable method, and is usable even if

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
On Jul 6, 2009, at 9:24 AM, Daniel Brown wrote: On Mon, Jul 6, 2009 at 11:04, Govindagovinda.webdnat...@gmail.com wrote: Kim, this is exactly what I was looking for. I had been over $_SERVER in the docs.. but somehow missed that basic obvious param. Thanks! And now I'll throw a

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Kim N. Lesmer
On Mon, 6 Jul 2009 16:16:55 -0600 Govinda govinda.webdnat...@gmail.com wrote: I do not really understand why $_SERVER['DOCUMENT_ROOT'] should return the right data at one time and not at another. (?) In general it will always provide the right data, but as the manual says: The entries in

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 18:16, Govindagovinda.webdnat...@gmail.com wrote: this is great, but then I still do not have a solution that will work for any level deep of dir/ . I.e. this- dirname(dirname(__FILE__)) gives the correct first part of the path to document root like

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
I want something that will work for calling an include from any file that lives n levels deep. That's where you have to define a variable (or constant) that tells the system where the web root is located, and then use that to determine where you are in relation to that. For example: ?php

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Paul M Foster
On Mon, Jul 06, 2009 at 07:15:03PM -0600, Govinda wrote: snip Dan I love to see smart hacks in action! ..and I believe I get what you are doing. I am just amazed that there is not a SIMPLE (one-liner) reliable way of just saying document root without a complex function like that. I mean

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
I'm not sure how this could be made simpler. $site_root = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR; Call that in any file in the root of *your* web directories, and you have what is essentially the document root for *your* site. Presumably, you know the *relative* directories of all

[PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-05 Thread Govinda
I am confusing myself reading the docs just now. i.e.: include_path basename() and dirname() I had thought from many months ago that ?php include '/somedir/somefile.php'; ? would include somefile.php living in somedir regardless from where in the site structure I am calling it. Now it does

Re: [PHP] Best way to reinstate radio-button states from database?

2009-06-30 Thread Tom Worster
On 6/29/09 10:26 PM, Michael A. Peters mpet...@mac.com wrote: Rob Gould wrote: I have a webpage which allows people to log in and make selections with radio buttons and hit SUBMIT and saves the data from those radio buttons to a mySQL database. However, I'm finding that I also need the

Re: [PHP] Best way to reinstate radio-button states from database?

2009-06-30 Thread Michael A. Peters
Tom Worster wrote: *snip* michael: radios and checkboxes take the checked attribute -- options in selects take the selected attribute. Doh - I knew that. Typo. I always thought it silly there were two different attributes anyway, when they basically are same thing and can never both occur in

Re: [PHP] Best way to reinstate radio-button states from database?

2009-06-29 Thread Ashley Sheridan
On Sun, 2009-06-28 at 21:07 -0400, Bastien Koert wrote: On Sun, Jun 28, 2009 at 7:12 PM, Rob Gouldgould...@mac.com wrote: I have a webpage which allows people to log in and make selections with radio buttons and hit SUBMIT and saves the data from those radio buttons to a mySQL database.

Re: [PHP] Best way to reinstate radio-button states from database?

2009-06-29 Thread tedd
At 7:12 PM -0400 6/28/09, Rob Gould wrote: I have a webpage which allows people to log in and make selections with radio buttons and hit SUBMIT and saves the data from those radio buttons to a mySQL database. However, I'm finding that I also need the ability to allow a user to log back in at

Re: [PHP] Best way to reinstate radio-button states from database?

2009-06-29 Thread Michael A. Peters
Rob Gould wrote: I have a webpage which allows people to log in and make selections with radio buttons and hit SUBMIT and saves the data from those radio buttons to a mySQL database. However, I'm finding that I also need the ability to allow a user to log back in at a later date (or even on

[PHP] Best way to reinstate radio-button states from database?

2009-06-28 Thread Rob Gould
I have a webpage which allows people to log in and make selections with radio buttons and hit SUBMIT and saves the data from those radio buttons to a mySQL database. However, I'm finding that I also need the ability to allow a user to log back in at a later date (or even on a different

Re: [PHP] Best way to reinstate radio-button states from database?

2009-06-28 Thread Bastien Koert
On Sun, Jun 28, 2009 at 7:12 PM, Rob Gouldgould...@mac.com wrote: I have a webpage which allows people to log in and make selections with radio buttons and hit SUBMIT and saves the data from those radio buttons to a mySQL database. However, I'm finding that I also need the ability to allow a

RE: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-24 Thread tedd
At 12:33 PM -0700 6/23/09, Daevid Vincent wrote: Other solutions seem to involve (hackishly) polling every x seconds. Seems there should be a better way. d There might not be a better solution. This is an example of javascript poling a php script: http://webbytedd.com/b/timed-php/ This is

RE: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-24 Thread tedd
At 10:30 AM -0400 6/24/09, tedd wrote: At 12:33 PM -0700 6/23/09, Daevid Vincent wrote: Other solutions seem to involve (hackishly) polling every x seconds. Seems there should be a better way. d There might not be a better solution. This is an example of javascript poling a php script:

[PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-23 Thread Daevid Vincent
I have a demo to create for a tradeshow. We have 3 touch screens and 3 50 plasmas and 3 G1 (android WiFi) phones. Our own LAN/Router/Wi-Fi. I need a way so that I can use web pages and Flash (actionscript) to make stuff happen on any of the displays/phones. So you click a button on the touch

Re: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-23 Thread Bastien Koert
On Tue, Jun 23, 2009 at 2:32 PM, Daevid Vincentdae...@daevid.com wrote: I have a demo to create for a tradeshow. We have 3 touch screens and 3 50 plasmas and 3 G1 (android WiFi) phones. Our own LAN/Router/Wi-Fi. I need a way so that I can use web pages and Flash (actionscript) to make stuff

RE: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-23 Thread Daevid Vincent
-Original Message- From: Bastien Koert [mailto:phps...@gmail.com] Sent: Tuesday, June 23, 2009 12:30 PM To: Daevid Vincent Cc: php-general@lists.php.net Subject: Re: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN On Tue, Jun 23, 2009 at 2:32 PM

Re: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-23 Thread Bastien Koert
On Tue, Jun 23, 2009 at 3:33 PM, Daevid Vincentdae...@daevid.com wrote: -Original Message- From: Bastien Koert [mailto:phps...@gmail.com] Sent: Tuesday, June 23, 2009 12:30 PM To: Daevid Vincent Cc: php-general@lists.php.net Subject: Re: [PHP] best way to communicate between PHP

[PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Mattias Thorslund
Hi all, Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when running PHP on IIS as when running it on Apache. Specifically, it seems to contain the script name only, and not the query string part. I know I can rewrite my code to piece together a $_SERVER['REQUEST_URI'] from

Re: [PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Andrew Ballard
On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund matt...@thorslund.us wrote: Hi all, Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when running PHP on IIS as when running it on Apache. Specifically, it seems to contain the script name only, and not the query string part.

Re: [PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Mattias Thorslund
Andrew Ballard wrote: On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund matt...@thorslund.us wrote: Hi all, Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when running PHP on IIS as when running it on Apache. Specifically, it seems to contain the script name only, and not

Re: [PHP] Best way to deal with $_SERVER['REQUEST_URI'] on IIS?

2009-04-21 Thread Andrew Ballard
On Tue, Apr 21, 2009 at 4:21 PM, Mattias Thorslund matt...@thorslund.us wrote: Andrew Ballard wrote: On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund matt...@thorslund.us wrote: Hi all, Apparently, $_SERVER['REQUEST_URI'] doesn't get set the same way when running PHP on IIS as when

[PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
I'm going crazy, can't quite get this encoding to work. I've tried all the various combinations, trying to send this block $xml (which is a simple string variable) via post along with 3 other params: $postArgs = http_build_query(array('method'='newPrintRequest', 'login'=$login,

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
Just realized I didn't happen to mention the problem. :-) The server is not seeing any of my posted fields. It's returning a properly-formatted XML response that says I did not submit the required fields. Unfortunately the server is a black box, but lots of other partners use it every

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Stuart
2009/2/12 Brian Dunning br...@briandunning.com: I'm going crazy, can't quite get this encoding to work. I've tried all the various combinations, trying to send this block $xml (which is a simple string variable) via post along with 3 other params: $postArgs =

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
This line is the key. WITH the line, I get a properly formatted XML response from the server, telling me that I did not send any valid post fields. WITHOUT the line, all I get back from the server is a '1' and their tech reports that no valid call was received from me. On Feb 11, 2009, at

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Stuart
2009/2/12 Brian Dunning br...@briandunning.com: This line is the key. WITH the line, I get a properly formatted XML response from the server, telling me that I did not send any valid post fields. WITHOUT the line, all I get back from the server is a '1' and their tech reports that no valid

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Brian Dunning
From the documentation: Parameters The following POST parameters are required: login - Assigned password - Assigned method - newPrintRequest, updatePrintRequest, reprintRequest orderxml - XML according to accompanying documentation The error that I get says no method was provided, and if you

Re: [PHP] Best way to post XML via curl?

2009-02-11 Thread Stuart
2009/2/12 Brian Dunning br...@briandunning.com: From the documentation: Parameters The following POST parameters are required: login - Assigned password - Assigned method - newPrintRequest, updatePrintRequest, reprintRequest orderxml - XML according to accompanying documentation The

Re: [PHP] Best way to recieve image from url?

2008-10-20 Thread Richard Heyes
... You could read it progressively using fopen(), fread() et al. Probably. This would mean only a small amount of data is read by yours erver at once. Eg: $rp = fopen('http:www.example.com/title.png', 'r'); $wp = fopen('mylocalfile', 'w'); while ($block = fread($rp, 8192)) { // 8k block size

[PHP] Best way to recieve image from url?

2008-10-19 Thread Nitsan Bin-Nun
Hi, I have this function: function saveImageFromUrl($image_url, $image_save) { $contents = file_get_contents($image_url); $fp = fopen($image_save, 'w'); fwrite($fp, $contents); fclose($fp); } As you can see it fetches the images contents and write

Re: [PHP] Best way to recieve image from url?

2008-10-19 Thread Børge Holen
On Oct 20, 2008, at 12:46 AM, Nitsan Bin-Nun wrote: Hi, I have this function: function saveImageFromUrl($image_url, $image_save) { $contents = file_get_contents($image_url); $fp = fopen($image_save, 'w'); fwrite($fp, $contents); fclose($fp); } As you

Re: [PHP] Best way to recieve image from url?

2008-10-19 Thread Daniel Brown
On Sun, Oct 19, 2008 at 6:46 PM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: As you can see it fetches the images contents and write them to new image on my local directory. Is this is the best way to do this? (I don't have curl) Do you have GET or wget on your server, with exec() privileges

Re: [PHP] Best way to recieve image from url?

2008-10-19 Thread Micah Gersten
If you're using file_get_contents, why aren't you using file_put_contents? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Nitsan Bin-Nun wrote: Hi, I have this function: function saveImageFromUrl($image_url, $image_save) { $contents =

Re: [PHP] best way for PHP page

2008-01-02 Thread Casey
On Jan 1, 2008 11:17 PM, Alain Roger [EMAIL PROTECTED] wrote: Hi, i would like to improve my coding quality when i use PHP code and for that i would request your help. in my web developer experience, i have to confess that i've never succeeded in spliting PHP code from HTML code. i mean

Re: [PHP] best way for PHP page

2008-01-02 Thread Sancar Saran
On Wednesday 02 January 2008 09:17:50 Alain Roger wrote: Hi, i would like to improve my coding quality when i use PHP code and for that i would request your help. in my web developer experience, i have to confess that i've never succeeded in spliting PHP code from HTML code. i mean that

Re: [PHP] best way for PHP page

2008-01-02 Thread Brady Mitchell
i would like to improve my coding quality when i use PHP code and for that i would request your help. in my web developer experience, i have to confess that i've never succeeded in spliting PHP code from HTML code. There's a myth that by separating html and php your code is cleaner, it's

Re: [PHP] best way for PHP page

2008-01-02 Thread Nathan Nobbe
On Jan 2, 2008 2:17 AM, Alain Roger [EMAIL PROTECTED] wrote: Hi, i would like to improve my coding quality when i use PHP code and for that i would request your help. in my web developer experience, i have to confess that i've never succeeded in spliting PHP code from HTML code. i mean

Re: [PHP] best way for PHP page

2008-01-02 Thread Dave Goodchild
If MVC is too heavy for you it may also be worth exploring templating engines such as Smarty: http://www.smarty.net/ On Jan 2, 2008 4:10 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 2, 2008 2:17 AM, Alain Roger [EMAIL PROTECTED] wrote: Hi, i would like to improve my coding quality

Re: [PHP] best way for PHP page

2008-01-02 Thread tedd
At 8:17 AM +0100 1/2/08, Alain Roger wrote: the purpose of my post is to know if i can really (at 100%) split client code (display images, write text,...) from server code (move or copy data to DB, create connection objects,...) so what do you think about that ? Alain: What do I think about

[PHP] best way for PHP page

2008-01-01 Thread Alain Roger
Hi, i would like to improve my coding quality when i use PHP code and for that i would request your help. in my web developer experience, i have to confess that i've never succeeded in spliting PHP code from HTML code. i mean that all my web pages consist of PHP code mixed with HTML code (for

[PHP] Best way to allow users to post youtube video links ?

2007-12-20 Thread Don Don
I want to allow people to be able to post links to videos on youtube. I've implemented it in a certain way by allowing them to copy the embed tag into a textarea and then submit the form. I pick up the form data, validate and display on the site. Is there any better way to do this or php

Re: [PHP] Best way to allow users to post youtube video links ?

2007-12-20 Thread TG
2007 08:20:16 -0800 (PST) Subject: [PHP] Best way to allow users to post youtube video links ? I want to allow people to be able to post links to videos on youtube. I've implemented it in a certain way by allowing them to copy the embed tag into a textarea and then submit the form. I pick up

Re: [PHP] Best way to automatically get mySQL database.

2007-10-31 Thread Angelo Zanetti
Hi Jay Thanks again, Now how would I do the SELECT remote_stuff INTO local_table; ? as these are on two different MySQL connections? Im not sure if this is possible to do in one statement or query? Seems possible in theory but I'm not sure. original message: Im wondering the best to do

[PHP] Best way to automatically get mySQL database.

2007-10-11 Thread Angelo Zanetti
hi guys. We've got a local system (PHP intranet) and we need to connect to a live mySQL server get some of the tables (contents) and overwrite the same tables in the local mySQL database. This needs to be done with PHP. Im wondering the best to do this. Is it to get all the information

RE: [PHP] Best way to automatically get mySQL database.

2007-10-11 Thread Jay Blanchard
[snip] We've got a local system (PHP intranet) and we need to connect to a live mySQL server get some of the tables (contents) and overwrite the same tables in the local mySQL database. This needs to be done with PHP. Im wondering the best to do this. Is it to get all the information into

Re: [PHP] Best way to automatically get mySQL database.

2007-10-11 Thread Angelo Zanetti
thanks thought there was something simpler Jay Blanchard wrote: [snip] We've got a local system (PHP intranet) and we need to connect to a live mySQL server get some of the tables (contents) and overwrite the same tables in the local mySQL database. This needs to be done with PHP. Im

[PHP] Best way to convert Little-Endian DWORD to string

2007-05-30 Thread Tijnema
Hi, Maybe quite strange question and quite off topic, but there's PHP involved :) I want to read out files, and then I come across 4byte DWORD values, they are stored in little endian values, but how do I get in a PHP string (as the values are too large for integer) My code is currently this:

RE: [PHP] Best way to convert Little-Endian DWORD to string

2007-05-30 Thread Edward Kay
-Original Message- From: Tijnema [mailto:[EMAIL PROTECTED] Sent: 30 May 2007 15:20 To: php Subject: [PHP] Best way to convert Little-Endian DWORD to string Hi, Maybe quite strange question and quite off topic, but there's PHP involved :) I want to read out files

Re: [PHP] Best way to convert Little-Endian DWORD to string

2007-05-30 Thread Tijnema
On 5/30/07, Edward Kay [EMAIL PROTECTED] wrote: -Original Message- From: Tijnema [mailto:[EMAIL PROTECTED] Sent: 30 May 2007 15:20 To: php Subject: [PHP] Best way to convert Little-Endian DWORD to string Hi, Maybe quite strange question and quite off topic, but there's PHP

Re: [PHP] Best way to convert Little-Endian DWORD to string

2007-05-30 Thread Richard Lynch
On Wed, May 30, 2007 9:19 am, Tijnema wrote: Maybe quite strange question and quite off topic, but there's PHP involved :) I want to read out files, and then I come across 4byte DWORD values, they are stored in little endian values, but how do I get in a PHP string (as the values are too

Re: [PHP] Best way to format double as money?

2007-05-06 Thread Larry Garfield
http://www.php.net/money_format On Saturday 05 May 2007, Todd Cary wrote: I have a MySQL DB that stores currency values as doubles. I want to display the values in the #,##0.00 format. What is the best way to do that? Todd -- Ariste Software 2200 D Street Ext Petaluma, CA 94952 (707)

Re: [PHP] Best way to format double as money?

2007-05-06 Thread heavyccasey
*sigh* http://www.google.com/search?hl=enq=PHP+format+double+as+moneybtnG=Search On 5/5/07, Larry Garfield [EMAIL PROTECTED] wrote: http://www.php.net/money_format On Saturday 05 May 2007, Todd Cary wrote: I have a MySQL DB that stores currency values as doubles. I want to display the

[PHP] Best way to format double as money?

2007-05-05 Thread Todd Cary
I have a MySQL DB that stores currency values as doubles. I want to display the values in the #,##0.00 format. What is the best way to do that? Todd -- Ariste Software 2200 D Street Ext Petaluma, CA 94952 (707) 773-4523 -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Best way to manage open slots for download

2007-01-02 Thread Richard Lynch
I think you want $bytes_out = $size, actually... I'm not sure what you are sending out for that last extra byte... :-) You could consider just timing out any zombies. You could use ignore_user_abort and hope to finish most of the downloads, as far as PHP is concerned, but I don't think

Re: [PHP] Best way to manage open slots for download

2007-01-01 Thread tedd
At 10:15 AM -0500 12/31/06, Rasmus Lerdorf wrote: What other ways can you recommend to me for the situtation? Read through this: http://www.php.net/manual/en/features.connection-handling.php -Rasmus -Rasmus: Just want to express my gratitude for your attendance to this list. Thanks.

[PHP] Best way to manage open slots for download

2006-12-31 Thread Aras
First of all, Happy New Year for everyone in the list. I wish 2007 brings all us happiness, health and peace. I want to read your advises at a point i am stuck within, i have an application that serves downloads to clients. For some reason i am limiting total open slot for some group of users

Re: [PHP] Best way to manage open slots for download

2006-12-31 Thread Rasmus Lerdorf
Aras wrote: First of all, Happy New Year for everyone in the list. I wish 2007 brings all us happiness, health and peace. I want to read your advises at a point i am stuck within, i have an application that serves downloads to clients. For some reason i am limiting total open slot for some

Re: [PHP] Best way to get PHP5

2006-08-10 Thread Jochem Maas
Jack Gates wrote: On Wednesday 09 August 2006 19:24, Jochem Maas wrote: Jonathan Duncan wrote: On Wed, 9 Aug 2006, Chris W. Parker wrote: Jack Gates mailto:[EMAIL PROTECTED] ... FUD-tastic! Jonathan Chris, Jochem just proved what I said earlier. Every one has their own

Re: [PHP] Best way to get PHP5

2006-08-10 Thread Robin Vickery
On 10/08/06, Chris W. Parker [EMAIL PROTECTED] wrote: Jonathan Duncan mailto:[EMAIL PROTECTED] on Wednesday, August 09, 2006 3:55 PM said: If you want to really learn Linux, try Gentoo. If you just want a very good and easy to use Linux, go with SuSE. To keep this related to the

RE: [PHP] Best way to get PHP5

2006-08-10 Thread Jonathan Duncan
On Wed, 9 Aug 2006, Chris W. Parker wrote: Jonathan Duncan mailto:[EMAIL PROTECTED] on Wednesday, August 09, 2006 3:55 PM said: If you want to really learn Linux, try Gentoo. If you just want a very good and easy to use Linux, go with SuSE. To keep this related to the question I

Re: [PHP] Best way to get PHP5

2006-08-10 Thread David Tulloh
Chris W. Parker wrote: Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have come with PHP5 and I'd really like to get with the times and use PHP5. I know

Re: [PHP] Best way to get PHP5

2006-08-10 Thread Robert Cummings
On Fri, 2006-08-11 at 00:29 +1000, David Tulloh wrote: Chris W. Parker wrote: Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have come with PHP5 and I'd

[PHP] Best way to get PHP5

2006-08-09 Thread Chris W. Parker
Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have come with PHP5 and I'd really like to get with the times and use PHP5. I know that Fedora Core 5 offers PHP

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Jonathan Duncan
On Wed, 9 Aug 2006, Chris W. Parker wrote: Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have come with PHP5 and I'd really like to get with the times and use

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Ray Hauge
On Wednesday 09 August 2006 12:03, Jonathan Duncan wrote: On Wed, 9 Aug 2006, Chris W. Parker wrote: Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Brad Bonkoski
Chris W. Parker wrote: Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have come with PHP5 and I'd really like to get with the times and use PHP5. I know that

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Jack Gates
On Wednesday 09 August 2006 12:02, Chris W. Parker wrote: I know that Fedora Core 5 offers PHP 5.1.2 but I've heard some negative things about it in general (FC5). What sort of negative things have you heard in general about (FC5)? -- Jack Gates http://www.morningstarcom.net/ -- PHP General

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Jochem Maas
Chris W. Parker wrote: Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have come with PHP5 and I'd really like to get with the times and use PHP5. I know

  1   2   3   4   >