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 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 lengths, so each > blo

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 Fil

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: http://php/

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 Jesse

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 wi

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 si

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 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

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 mi

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 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 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 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 (http://www.php.net/

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 $include.

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 o

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 goug

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 hop

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 s

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

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 simp

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 read first 20 characters of a string?

2009-12-02 Thread Chris Payne
Thank you everyone, I REALLY appreciate it. Sorry my head isn't in place today and I couldn't think. Chris On Wed, Dec 2, 2009 at 10:18 AM, Devendra Jadhav wrote: > mysql substr function > http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substr > > On Wed, Dec 2, 2009 at 8:

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

2009-12-02 Thread Devendra Jadhav
mysql substr function http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substr On Wed, Dec 2, 2009 at 8:41 PM, Chris Payne 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

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

2009-12-02 Thread Majk.Skoric
Not exaclty a php thingie but well ;) Sql: Select left(column, 20) as c from table. Or you can do it with “select substr(columnname, 0,20)“. See the mysql manual. Dunno which of the two is faster, but i think “left“ is. Majk - Original Message - From: oxygene...@gmail.com To:

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 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 > of whether they are

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

2009-07-06 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 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 y

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: > > 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 mea

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:

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, Govinda 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 > $_SERVER['DOCUMENT_ROOT'] does > only wh

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 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 this array ($_SERVER) are cr

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, Govinda 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 an

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 Brown 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 $_SERVER data is not a

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, Govinda 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 works, but don't always re

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 Kim N. Lesmer
On Sun, 5 Jul 2009 14:33:07 -0600 Govinda 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 > > would include > somefile.php > living in > somedir > regardless from where in the site str

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-30 Thread Tom Worster
On 6/29/09 10:26 PM, "Michael A. Peters" 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 abilit

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 a

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 Ashley Sheridan
On Sun, 2009-06-28 at 21:07 -0400, Bastien Koert wrote: > On Sun, Jun 28, 2009 at 7:12 PM, 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. > > > > Howev

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 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

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: Be

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 s

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 Vincent 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:

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 > >

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 Vincent 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 > happen on any o

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 wrote: > Andrew Ballard wrote: >> >> On Tue, Apr 21, 2009 at 4:04 PM, Mattias Thorslund >> 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

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 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 par

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 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. > > I know I can

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

2009-02-11 Thread Stuart
2009/2/12 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

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 loo

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

2009-02-11 Thread Stuart
2009/2/12 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

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 : > 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',

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 day

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

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) > { > $cont

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() privil

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 can

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

2007-12-20 Thread TG
Just a thought.. it might be better to control the output a little more. I assume if you're letting them submit the embed code that you're turning around and just displaying what they posted. It might be easier for the user and more secure if you have them submit either the full youtube URL:

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

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 wond

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 resu

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 to

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 the

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 f

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

2007-05-05 Thread heavyccasey
*sigh* http://www.google.com/search?hl=en&q=PHP+format+double+as+money&btnG=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

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

2007-05-05 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 949

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 igno

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. t

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

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 PH

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

RE: [PHP] Best way to get PHP5

2006-08-10 Thread Jonathan Duncan
On Wed, 9 Aug 2006, Chris W. Parker wrote: Jonathan Duncan 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 asked

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 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 qu

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 ... >> FUD-tastic! >> >>> Jonathan > > Chris, > > Jochem just proved what I said earlier. > > Every

RE: [PHP] Best way to get PHP5

2006-08-09 Thread Chris W. Parker
Jonathan Duncan 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 asked... Do either of the latest builds of these

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Jack Gates
On Wednesday 09 August 2006 19:24, Jochem Maas wrote: > Jonathan Duncan wrote: > > On Wed, 9 Aug 2006, Chris W. Parker wrote: > >> Jack Gates > >> > >>on Wednesday, August 09, 2006 10:16 AM said: > >>> On Wednesday 09 August 2006 12:02, Chris W. Parker wrote: > I

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Jochem Maas
Jonathan Duncan wrote: > > On Wed, 9 Aug 2006, Chris W. Parker wrote: > >> Jack Gates >>on Wednesday, August 09, 2006 10:16 AM said: >> >>> 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

RE: [PHP] Best way to get PHP5

2006-08-09 Thread Jonathan Duncan
On Wed, 9 Aug 2006, Chris W. Parker wrote: Jack Gates on Wednesday, August 09, 2006 10:16 AM said: 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).

RE: [PHP] Best way to get PHP5

2006-08-09 Thread Chris W. Parker
Jack Gates on Wednesday, August 09, 2006 10:16 AM said: > 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

RE: [PHP] Best way to get PHP5

2006-08-09 Thread Chris W. Parker
Jochem Maas on Wednesday, August 09, 2006 11:05 AM said: [snip useful stuff] > 1. you can skip 'make test' > 2. if in doubt do 'make clean' before 'make' > 3. rinse and repeat 'configure', 'make', 'make install' as required > 4. do './configure --help' to see all th

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

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 Genera

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 F

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

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 save reports, comments and suggestions welcome

2006-05-29 Thread Ryan A
Hey Rob, > > I have done very little SUM queries with time, can > you > > give me a quick example or any site where i can > find a > > few sample queries? > > This is basic MySQL so you should RTFM, and > generally should be asking > on a MySQL list :) Hehehe, true... Dont really like the MySql

Re: [PHP] Best way to save reports, comments and suggestions welcome

2006-05-29 Thread Robert Cummings
On Mon, 2006-05-29 at 08:55, Ryan A wrote: > > Regardless of how you determine the end of the > > logged in time, you > > shouldn't track all the different sums in every > > entry since that's > > redundant. You don't even need the extra data since > > the database will > > happily allow you to per

Re: [PHP] Best way to save reports, comments and suggestions welcome

2006-05-29 Thread Ryan A
Hey Robert, > > I have to write a kind of logging script which > will keep records of how long a person used the site > and its functions, so far this is what I have come up > > with: ... > Presuming you know when they logged out or can > calculate it: > > user_id > login_time timesta

Re: [PHP] Best way to save reports, comments and suggestions welcome

2006-05-28 Thread Robert Cummings
On Sun, 2006-05-28 at 18:49, Ryan A wrote: > Hi, > I have to write a kind of logging script which will > keep records of how long a person used the site and > its functions, so far this is what I have come up > with: > > login_username varchar(50) > as_guide <- You can ignore this,its for a specia

Re: [PHP] Best way to handle multiple snmpgets

2006-05-26 Thread Jochem Maas
Pavleck, Jeremy D. wrote: Greetings, I'm creating a more or less 'dashboard' where people can enter the server name, then I'll snmpget a bunch of different oids and show the status of the device. Now the problem is snmpget doesn't allow multiple OIDs in one go, so I have to snmpget(server, comm

Re: [PHP] Best way to start a CRON

2006-04-20 Thread Richard Lynch
On Thu, April 20, 2006 4:03 am, Barry wrote: > What would be the best way to start a PHP Script via CRONJOB? > Should i use the 'php' command or use curl or lynx or something to > open that URL? Ideally just use CLI PHP. Slightly sub-optimal is CGI PHP with -q argument. Also use FULL PATH to the

Re: [PHP] Best way to start a CRON

2006-04-20 Thread John Nichel
Pure Web Solution wrote: I run several PHP scripts via CRON in the following way: put the following in the top of the php script: #!/usr/local/bin/php -q (linux system - location of php bin) ^^^ If you're going to use this and in the CRONTAB I have the following: 10 1 * * * root /

Re: [PHP] Best way to start a CRON

2006-04-20 Thread M. Sokolewicz
Actually, you can even use less "code" to do exactly the same thing (since you can EITHER make an excutable file with the shebang, which you start doing, but never actually do, OR call php to just read the file and execute the code inside it, which you in the end do). Basically, either: #!/usr

Re: [PHP] Best way to start a CRON

2006-04-20 Thread Barry
Pure Web Solution wrote: I run several PHP scripts via CRON in the following way: put the following in the top of the php script: #!/usr/local/bin/php -q (linux system - location of php bin) and in the CRONTAB I have the following: 10 1 * * * root /usr/local/bin/php -q /script/CRONexport.php

Re: [PHP] Best way to start a CRON

2006-04-20 Thread Pure Web Solution
I run several PHP scripts via CRON in the following way: put the following in the top of the php script: #!/usr/local/bin/php -q (linux system - location of php bin) and in the CRONTAB I have the following: 10 1 * * * root /usr/local/bin/php -q /script/CRONexport.php the -q supress HTML header

Re: [PHP] Best way to start a CRON

2006-04-20 Thread nicolas figaro
Barry a écrit : Hello Everyone! What would be the best way to start a PHP Script via CRONJOB? Should i use the 'php' command or use curl or lynx or something to open that URL? Hi, unless you need to be sure the http server is up and running, it's a better way to run your script via a cronjob.

Re: [PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 2:27 pm, Sue wrote: > I am retrieving records from a MySQL database and need to just display > each > record one after the other on a page. I only want to display a > maximum of > 25 records per page though, and am wondering if there is a way to > handle > this easily with

RE: [PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Weber Sites LTD
Check out : Pagination http://www.weberdev.com/get_example-4242.html Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com Free Uptime Monitor : http://uptime.weberdev.com PHP content for your site : http://c

Re: [PHP] Best way to handle PREVIOUS and NEXT processing of database records retrieved

2006-01-26 Thread Jay Paulson
You could always use the LIMIT functionality in MySQL SELECT * FROM table LIMIT 0,25 Then just pass the variables for the limit to start at and how many you want returned in your query. SELECT * FROM table LIMIT $start,$num_returned So looking at records 26 through 50 your links would look like

  1   2   3   >