Re: [PHP] [X-POST] Fastest way to dump this huge table

2007-05-02 Thread clive
I'd say give some attention to the zip method you use. or better yet rsync the file, send only what has changed. -- Regards, Clive. Real Time Travel Connections {No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may

Re: [PHP] [X-POST] Fastest way to dump this huge table

2007-05-02 Thread Richard Lynch
On Wed, May 2, 2007 8:54 am, Brian Dunning wrote: I have a huge MySQL table, 2.1 million records, 200MB. Once a week I need to dump it in CSV format and zip the file. You could run mysql_dump once by hand and test just how bad it is, and be ready to kill -9 it if the server gets hurt... But,

Re: [PHP] [X-POST] Fastest way to dump this huge table

2007-05-02 Thread Brian Dunning
Thanks to everyone who answered, think I've got enough info now to handle it. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-27 Thread tedd
At 2:35 PM -0400 4/26/07, Daniel Brown wrote: Interesting and being in Pennsylvania, I'm in the all-consent group but being originally from New Jersey, where I still thought it was law, I'm confused isn't there a Federal mandate about this as well? You want confusing, try

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-27 Thread Robert Cummings
On Fri, 2007-04-27 at 09:22 -0400, tedd wrote: At 2:35 PM -0400 4/26/07, Daniel Brown wrote: Interesting and being in Pennsylvania, I'm in the all-consent group but being originally from New Jersey, where I still thought it was law, I'm confused isn't there a Federal mandate

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-26 Thread Daniel Brown
Interesting and being in Pennsylvania, I'm in the all-consent group but being originally from New Jersey, where I still thought it was law, I'm confused isn't there a Federal mandate about this as well? On 4/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In the US you can

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-26 Thread jgodish
Federal law says that at least one party taking part in the call MUST consent to the recording. (18 U.S.C. Sec. 2511(2)(d)) Quoting Daniel Brown [EMAIL PROTECTED]: Interesting and being in Pennsylvania, I'm in the all-consent group but being originally from New Jersey, where I

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-26 Thread Daniel Brown
Thank you, sir! Didn't have the minute to look it up. Excellent citing. On 4/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Federal law says that at least one party taking part in the call MUST consent to the recording. (18 U.S.C. Sec. 2511(2)(d)) Quoting Daniel Brown [EMAIL

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-26 Thread jgodish
If your really interested in this subject try; http://www.rcfp.org/taping/ Quoting Daniel Brown [EMAIL PROTECTED]: Interesting and being in Pennsylvania, I'm in the all-consent group but being originally from New Jersey, where I still thought it was law, I'm confused isn't

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-26 Thread Tijnema !
On 4/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: If your really interested in this subject try; http://www.rcfp.org/taping/ Does there exists such page for world-wide phone calls? Tijnema Quoting Daniel Brown [EMAIL PROTECTED]: Interesting and being in Pennsylvania, I'm in

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-26 Thread Daniel Brown
John, You do realize now that this thread is going to show up in Google searches for wannabe spies, jealous spouses, lawsuit-filers, and anyone calling Sprint Customer Service, right? On 4/26/07, Tijnema ! [EMAIL PROTECTED] wrote: On 4/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Re: [PHP] Re: PHP Text Messaging [Straying Way OT]

2007-04-26 Thread jgodish
The power of the Internet, free speach freedom information at work!! Quoting Daniel Brown [EMAIL PROTECTED]: John, You do realize now that this thread is going to show up in Google searches for wannabe spies, jealous spouses, lawsuit-filers, and anyone calling Sprint Customer

Re: [PHP] Is there a way to un include a file

2007-03-12 Thread Richard Lynch
No. You could perhaps wipe out *EVERYTHING* in $_GLOBALS, which would be the included file and anything in the main file[s] that went before. If you need an environment that is that pure for testing or something, you can run a different PHP process on each file. Otherwise, you simply have to

Re: [PHP] Is there a way to un include a file

2007-03-08 Thread jekillen
On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote: No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them un-exist (with unset()

Re: [PHP] Is there a way to un include a file

2007-03-08 Thread Chris
jekillen wrote: On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote: No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them

[PHP] Is there a way to un include a file

2007-03-07 Thread jekillen
Hello; Is there a way to un include a file once it has been included in a script. My concern is where two php files might be included in another php file they might have code or variables that conflict. I am thinking of including files with different names but follow the same pattern of code

Re: [PHP] Is there a way to un include a file

2007-03-07 Thread Børge Holen
On Thursday 08 March 2007 07:18, jekillen wrote: Hello; Is there a way to un include a file once it has been included in a script. You seems to want the wrong thing... I could be mistaken, but from my point of view you would NOT include the file if not apropriate at that moment. My

Re: [PHP] Is there a way to un include a file

2007-03-07 Thread Tijnema !
AFAIK there's no function to un include a file, but i don't see a problem here, as when you include your second file, everything (all conflicting variables) will be overwritten. If you still have problems, you might want to use classes around your functions and variables. Tijnema On 3/8/07,

Re: [PHP] Is there a way to un include a file

2007-03-07 Thread Larry Garfield
No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them un-exist (with unset() for variables or, well, you can't with functions and

Re: [PHP] Is there a way to redefine a constant?

2007-02-09 Thread Jochem Maas
Khai wrote: STDERR and STDOUT are defined as constants. Is there a way to redefine these constants? only if you use runkit (which is probably not recommended in production environments): http://php.net/runkit consider that constants are called as such for a reason. you should

Re: [PHP] Is there a way to redefine a constant?

2007-02-09 Thread Jochem Maas
please keep the replies 'on list' ... Khai Doan wrote: Sorry, I hit the Send button by mistake. My problem is that these constant are defined at compile / startup time, before my script get to run. In Perl, I can close STDERR and STDOUT and re-open them to any file at anytime. In Perl, I

[PHP] Is there a way to redefine a constant?

2007-02-08 Thread Khai
STDERR and STDOUT are defined as constants. Is there a way to redefine these constants? Thanks Khai -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is there a way to redefine a constant?

2007-02-08 Thread Chris
Khai wrote: STDERR and STDOUT are defined as constants. Is there a way to redefine these constants? Nope. Once they're set, they're set. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] is there another way ??

2007-01-18 Thread clive
Ali Nasser wrote: can you please check these out and tell me if there another way without installing externsions?? no sorry I cant check for you!

[PHP] is there another way ??

2007-01-17 Thread Ali Nasser
can you please check these out and tell me if there another way without installing externsions?? http://groups-beta.google.com/group/cpdevgroup/web/how-easy-is-these-project?_done=%2Fgroup%2Fcpdevgroup%2Fweb%2Fhow-easy-is-these-project%3Fmsg%3Dns

Re: [PHP] is there another way ??

2007-01-17 Thread Curt Zirzow
Oops, i forgot to reply to php-general@ on this use this reply instead of the one i sent to your specific email. On 1/16/07, Ali Nasser [EMAIL PROTECTED] wrote: can you please check these out and tell me if there another way without installing externsions??

[PHP] Send emails from PHP ... in a secure way

2006-12-05 Thread Ruben Rubio
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a question sending mails from PHP. Actually I am using phpmailer (is good!!) but when this class sends an email and there is an error (Mail server is not ready) It just reports error and email is lost. Is out there any way to save failed

Re: [PHP] Send emails from PHP ... in a secure way

2006-12-05 Thread clive
Ruben Rubio wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a question sending mails from PHP. Actually I am using phpmailer (is good!!) but when this class sends an email and there is an error (Mail server is not ready) It just reports error and email is lost. how are you

Re: [PHP] Send emails from PHP ... in a secure way

2006-12-05 Thread Ruben Rubio
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 clive escribió: Ruben Rubio wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 the MTA then something is very wrong Why cant you save the email in a file or a database and then send it later your self? Because if Mail server has a problem

Re: [PHP] Send emails from PHP ... in a secure way

2006-12-05 Thread T . Lensselink
You can store the emails in a database or textfile when an error occurs. And use crontab to check the stored messages and send them to the mailserver. On Tue, 05 Dec 2006 10:55:50 +0100, Ruben Rubio [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 clive escribió: Ruben

Re: [PHP] Send emails from PHP ... in a secure way

2006-12-05 Thread Ruben Rubio
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 T.Lensselink escribió: You can store the emails in a database or textfile when an error occurs. And use crontab to check the stored messages and send them to the mailserver. Is out there something that actually do it? -BEGIN PGP SIGNATURE-

Re: [PHP] Send emails from PHP ... in a secure way

2006-12-05 Thread Jochem Maas
Ruben Rubio wrote: T.Lensselink escribió: You can store the emails in a database or textfile when an error occurs. And use crontab to check the stored messages and send them to the mailserver. Is out there something that actually do it? php, perl, python, ruby, c, c++ ... just about any

[PHP] [SOLVED - THE REDHAT WAY] Re: [PHP] stupid compile problem... additional ini files not found

2006-08-21 Thread Jochem Maas
I worked round my problem by adding the contents of my additional ini files to the bottom of the std ini file - a typical redhat solution to a typical redhat problem (I only ever seem to have to go through this kind of crap on Redhat - Debian is much nicer to me). Jochem Maas wrote: hi people,

Re: [PHP] What is best way to do handle audio files?

2006-04-09 Thread Nicholas Couloute
Yea, okay looks like I am going to be using mysql cause I want an organized site by genre, author etc. I going to need some resources of mysql cause I haven't used it before! I have used flatfile for about a year now! On Sun, 9 Apr 2006 12:02 am, Richard Lynch wrote: If the files are

Re: [PHP] What is best way to do handle audio files?

2006-04-09 Thread Dave Goodchild
You will probably find a great deal of list members well versed in mysql as it meshes so well with php, so ask away old bean. On 09/04/06, Nicholas Couloute [EMAIL PROTECTED] wrote: Yea, okay looks like I am going to be using mysql cause I want an organized site by genre, author etc. I going

[PHP] What is best way to do handle audio files?

2006-04-08 Thread Nicholas Couloute
On my website http://www.sidekick2music.com ! I use scandir() [php 5.0] to fetch all the files which are all in subfolders of this one folder. like this: public_html/amrs/$cat/$author/*.amr $cat = different catergoried of music $author = Authors of the particular catergory This way isn't fast

[PHP] What is best way to do handle audio files?

2006-04-08 Thread Nicholas Couloute
On my website http://www.sidekick2music.com ! I use scandir() to fetch all the files which are all in subfolders of this one folder. like this: public_html/amrs/$cat/$author/*.amr $cat = different catergoried of music $author = Authors of the particular catergory This way isn't fast when you

Re: [PHP] What is best way to do handle audio files?

2006-04-08 Thread tedd
At 12:01 PM -0400 4/8/06, Nicholas Couloute wrote: On my website http://www.sidekick2music.com ! I use scandir() [php 5.0] to fetch all the files which are all in subfolders of this one folder. like this: public_html/amrs/$cat/$author/*.amr $cat = different catergoried of music $author =

Re: [PHP] What is best way to do handle audio files?

2006-04-08 Thread Richard Lynch
If the files are constantly changing, scandir is probably as fast as it gets... If you rarely alter the files, do scandir once and store the results in, say, MySQL and you can search/sort MUCH faster. On Sat, April 8, 2006 11:01 am, Nicholas Couloute wrote: On my website

Re: [PHP] Is there a way to get multiple values for a singleinput in a form submission?

2006-03-23 Thread mslemko
Thanks Warren, This works! The side effect that is -somewhat- undesirable is that it becomes incompatible accessing the field with Javascript. Perhaps there is a way to get around that problem though. -Mark Warren Vail wrote: Set the name of your field in html to be; name=myselect[]

Re: [PHP] Is there a way to get multiple values for a singleinput in a form submission?

2006-03-23 Thread sgsweb
Hi Mark, Actually you can access this variable within Javascript in the following manner: function chgablacted() { box = regs['myselect[]']; value = box.options[box.selectedIndex].value; if (value == 'some value') { ... } else { ... } } The name of the variable will include the

Re: [PHP] Is there a way to get multiple values for a single input in a form submission?

2006-03-23 Thread Richard Lynch
On Tue, March 21, 2006 4:44 pm, mslemko wrote: this is what I am trying to do: On a web form I might have a select input with multiple selections enabled, however I want to have access to the list within PHP after submission. select multiple='true' name='myselect' For PHP, use

[PHP] Is there a way to get multiple values for a single input in a form submission?

2006-03-21 Thread mslemko
this is what I am trying to do: On a web form I might have a select input with multiple selections enabled, however I want to have access to the list within PHP after submission. select multiple='true' name='myselect' option value='1'1/option option value='2'2/option /select so when this

Re: [PHP] Is there a way to get multiple values for a single input in a form submission?

2006-03-21 Thread Warren Vail
Set the name of your field in html to be; name=myselect[] that way when the form is returned to you each selected value is returned to you, for example if you code $choices = $_POST[myselect]; choices will be an array containing the actual values selected when the form is submitted. hope

Re: [PHP] Is there a way to get multiple values for a single input in a form submission?

2006-03-21 Thread tedd
this is what I am trying to do: On a web form I might have a select input with multiple selections enabled, however I want to have access to the list within PHP after submission. select multiple='true' name='myselect' option value='1'1/option option value='2'2/option /select so when this

[PHP] Is there any way to create a Persistent FTP Connection?

2006-01-16 Thread GlasshopperMultimedia
I nam trying to build a file transfer utility for a content management system - I believe that the best way to do this is via a frame based utility which connects in one frame - handles all transfers and messagaing in another frame which is continually polled with new ftp commands. However I have

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Adrian Bruce
Something along these lines will work fine ?php $query = mysql_query(select dates from table ) or die (mysql_error()); echoselect name='test'; while ($row = mysql_fetch_array($query, MYSQL_NUM)){ echooption value='$row[0]'$row[1]/option; } echo/select; ? Regards Ade Sue wrote:

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread David Grant
Sue, Sue wrote: We have a form that contains a Select option for a listing of available dates for the user to choose from. Right now we have to manually change the dates within the form's Selection list as new dates become available to choose from. We currently store these available

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
Sue wrote: Hello, We have a form that contains a Select option for a listing of available dates for the user to choose from. Right now we have to manually change the dates within the form's Selection list as new dates become available to choose from. We currently store these available

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. Adrian Bruce wrote: Something along these lines will work fine ?php $query = mysql_query(select dates from table ) or die (mysql_error()); echoselect name='test'; while ($row =

RE: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jay Blanchard
[snip] teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. [/snip] Why is this counter-productive? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread David Grant
Jochem, Jochem Maas wrote: teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. I disagree, however, I do believe attention should be drawn to reasons why doing so might be considered bad practice. Even the longest journeys start with

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
Jay Blanchard wrote: [snip] teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. [/snip] Why is this counter-productive? it's a shit way of doing things - with the added bonus that it usually comes with shit output (as non-validating,

RE: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jay Blanchard
[snip] [snip] teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. [/snip] Why is this counter-productive? it's a shit way of doing things - with the added bonus that it usually comes with shit output (as non-validating,

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Adrian Bruce
the quickest solution and one that is easy to understand, I am no php expert and have never claimed as such so why 'noob'? Why is this such a poor method? if i type the HTML to be outputted correctly then what validation is required? also I think Someone new would run from your proposed

RE: [PHP] Is there a way to display data from database for SelectOptions in a form?

2006-01-10 Thread Jay Paulson \(CE CEN\)
[snip]Let's look at it another way, why 70-80 lines of code when 4 will do it properly when done correctly?[/snip] I agree with this line of thinking especially for a new person to php. When I first read the solution that was so long I thought to myself great and this person is new to php and

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
David Grant wrote: Jochem, Jochem Maas wrote: teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. I disagree, however, I do believe attention should be drawn to reasons why doing so might be considered bad practice. 1. your looping

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread David Grant
Jochem, Jochem Maas wrote: David Grant wrote: 1. your looping a result set which involves a db connection - lots of pontential things that could go wrong... Absolutely, and lots of lessons to learn too. 2. its not a centralized 'solution' - code reuse is a good thing. However, what use is

Re: [PHP] Is there a way to display data from database for SelectOptions in a form?

2006-01-10 Thread Jochem Maas
Jay Paulson (CE CEN) wrote: [snip]Let's look at it another way, why 70-80 lines of code when 4 will do it properly when done correctly?[/snip] 4 * 20 = 80 so after having created 20 dynamic select boxes the function wins it. I really don't think that performance here is the issue - one should

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
Adrian Bruce wrote: the quickest solution and one that is easy to understand, I am no php expert and have never claimed as such so why 'noob'? Why is this such a poor method? if i type the HTML to be outputted correctly then what validation is required? also I think Someone new would run

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread DarkX
You mean like... $Link = mysql_connect(Host, User, Pass); mysql_select_db(MyDB); $Datefield = Dates; $Select = mysql_query(SELECT * FROM `Table` WHERE `.$Dates.` LIKE *); $MySelect = select onChange='WhateverJavascript()' id='whateverId' While($Row = @mysql_fetch_assoc($Select)) { //Adds each

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
David Grant wrote: Jochem, Jochem Maas wrote: David Grant wrote: 1. your looping a result set which involves a db connection - lots of pontential things that could go wrong... Absolutely, and lots of lessons to learn too. by that argument your own children shouldn't be sent to school;

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Mike Smith
On 1/10/06, Sue [EMAIL PROTECTED] wrote: Hello, We have a form that contains a Select option for a listing of available dates for the user to choose from. Right now we have to manually change the dates within the form's Selection list as new dates become available to choose from. We

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jake Gardner
Jochem: Your method is long, probably takes more time to run, and is therefore inefficient in this circumstance. There is a time and place for a good solid reusable function, or even a class. Of course things could go wrong when using mySQL connections, but things can always go wrong. Bringing

RE: [PHP] Forwarding $_POST Values WAY OT

2005-12-09 Thread Jay Blanchard
[snip] Well if you were not rude then you certainly are now - Too much correspondence with you in that vein could contaminate the environment. chuckles Also sounds like you have a few prejudices to grow out of .. who would you like to be when you grow up? BTW I suggest you use a dictionary if you

RE: [PHP] Forwarding $_POST Values WAY OT

2005-12-09 Thread Robert Cummings
On Fri, 2005-12-09 at 15:40, Jay Blanchard wrote: ROFLMMFAO! I'm jest curious here... is that extra 'M' for massive? :B Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com |

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-23 Thread David Grant
$_SERVER['HTTP_USER_AGENT'] contains whatever the browser passes to the server to identify itself, which may be faked by certain browsers at the discretion of the user. The two user agents you provide as an example are both extremely common. Cheers, David Grant twistednetadmin wrote: Thanks

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-23 Thread Frank Armitage
twistednetadmin wrote: Thanks guys. That helps alot! But this: ?php print $_SERVER['HTTP_USER_AGENT']; ? Returned this using Mozilla: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 And this using IE: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-23 Thread Yaswanth Narvaneni
Dirty Code if((ereg(Nav, getenv(HTTP_USER_AGENT))) || (ereg(Gold, getenv(HTTP_USER_AGENT))) || (ereg(X11, getenv(HTTP_USER_AGENT))) || (ereg(Mozilla, getenv( HTTP_USER_AGENT))) || (ereg(Netscape, getenv(HTTP_USER_AGENT))) AND (!ereg(MSIE, getenv(HTTP_USER_AGENT $c_browser = Netscape;

[PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-22 Thread twistednetadmin
Is it possible to use PHP to find out wich type of browser is in use? Or must is this done by javascript or something else? I would like to have a little statistic on my page that tells me what browser is currently moet used.

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-22 Thread Joe Wollard
On Nov 23, 2005, at 12:43 AM, twistednetadmin wrote: Is it possible to use PHP to find out wich type of browser is in use? Or must is this done by javascript or something else? I would like to have a little statistic on my page that tells me what browser is currently moet used. Try: ?php

Re: [PHP] Is there a way to determine wich browser a visitor uses in php?

2005-11-22 Thread twistednetadmin
Thanks guys. That helps alot! But this: ?php print $_SERVER['HTTP_USER_AGENT']; ? Returned this using Mozilla: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 And this using IE: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) Does that just mean

[PHP] Re: Re: better way to mix html and php code?

2005-11-21 Thread Dan Baker
Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Here is an example of a layout template: - jinn:prepend/ html head titlejinn:pageTitle//title style type=text/css !--

Re: [PHP] Re: Re: better way to mix html and php code?

2005-11-21 Thread Robert Cummings
On Mon, 2005-11-21 at 13:41, Dan Baker wrote: Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Here is an example of a layout template: - jinn:prepend/ html head

[PHP] Re: Re: better way to mix html and php code?

2005-11-17 Thread Dan Baker
Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 2005-11-17 at 14:34, Dan Baker wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi to all, always wondered what's better way to mix html and php code. Here are three ways of the same code

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-19 Thread Ruben Rubio Rey
:( Its not working $bytes = @readfile($filename); if ($bytes === false){ //error-handling code } There is not any output ? Richard Lynch wrote: On Fri, October 14, 2005 6:29 am, Ruben Rubio Rey wrote: if(file_exists($filename)){ $modified_date=filemtime($filename);

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-17 Thread Ruben Rubio Rey
Richard Lynch wrote: On Fri, October 14, 2005 6:29 am, Ruben Rubio Rey wrote: if(file_exists($filename)){ $modified_date=filemtime($filename); if(time()($modified_date+1 * 24 * 60 * 60)){ $handle = fopen($filename, r); $contents = fread($handle,

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-15 Thread Chris Shiflett
Ruben Rubio Rey wrote: $handle = fopen($filename, r); $contents = fread($handle, filesize($filename)); fclose($handle); echo $contents; Replace this with: readfile($filename); It's faster for both you and PHP. Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy

[PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Ruben Rubio Rey
Hi, I m creating a cache system, and i have a problem: PHP takes a lot of time opening the file. (Im using 2.6.9-1.667smp and XFS) * For files less or equal 6 Kb, takes arround 0.02-0.03 miliseconds - its ok * For files arround 35 Kb takes arround 0.2-0.4 miliseconds - too much. What can I

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Richard Davey
Hi Ruben, Friday, October 14, 2005, 12:29:09 PM, you wrote: What can I do to make faster opening files? ** Source code: if(file_exists($filename)){ $modified_date=filemtime($filename);

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Jochem Maas
Ruben Rubio Rey wrote: Hi, I m creating a cache system, and i have a problem: PHP takes a lot of time opening the file. (Im using 2.6.9-1.667smp and XFS) * For files less or equal 6 Kb, takes arround 0.02-0.03 miliseconds - its ok * For files arround 35 Kb takes arround 0.2-0.4

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Marcus Bointon
On 14 Oct 2005, at 12:29, Ruben Rubio Rey wrote: * For files less or equal 6 Kb, takes arround 0.02-0.03 miliseconds - its ok * For files arround 35 Kb takes arround 0.2-0.4 miliseconds - too much. Bearing in mind that average access time on a 7200rpm HD is around 8ms, those numbers

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Richard Lynch
On Fri, October 14, 2005 6:29 am, Ruben Rubio Rey wrote: if(file_exists($filename)){ $modified_date=filemtime($filename); if(time()($modified_date+1 * 24 * 60 * 60)){ $handle = fopen($filename, r); $contents = fread($handle, filesize($filename));

[PHP] What's the safest way to destory/wipe out the arrays within the associative arrays?

2005-10-13 Thread Scott Fletcher
[code] $xml = array ( 'NEWSFEED' = array ( '0' = array ( 'MESSAGE' = array ( '0' = array ( 'ATTRIBUTES' = array ( 'ID' = 'test2', 'TID' = 'test4' ), 'TITLE' = array ( '0' =

Re: [PHP] What's the safest way to destory/wipe out the arrays within the associative arrays?

2005-10-13 Thread Paul Waring
On Wed, Oct 05, 2005 at 03:12:51PM -0400, Scott Fletcher wrote: What is the safest way to destroy or take out the $xml['NEWSFEED']['0']['MESSAGE']['2']. associative arrays starting with ['2'] and those arrays inside of the ['2'] array path? The unset() would make it not possible to

Re: [PHP] What's the safest way to destory/wipe out the arrays within the associative arrays?

2005-10-13 Thread Richard Lynch
On Wed, October 5, 2005 2:12 pm, Scott Fletcher wrote: What is the safest way to destroy or take out the $xml['NEWSFEED']['0']['MESSAGE']['2']. associative arrays starting with ['2'] and those arrays inside of the ['2'] array path? The unset() would make it not possible to reassign the

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-22 Thread Richard Lynch
On Mon, July 18, 2005 8:24 pm, Ryan A said: I didnt totally understand you q in the beginning (and still dont fully), but ?php $x = 5; ? He wants a function that, if you put in $x, you get out 'x' For *ANY* $variable. There is no such function. Usually the person asking it is doing

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-22 Thread Edward Vermillion
Richard Lynch wrote: [snip] PS It's true that your variable could/would/should appear in debug_backtrace, but how would you pick it out from all the other variables that would appear in your debug_backtrace? For that matter, it's in $_GLOBALS, but how would you pick it out? You could print

RE: [PHP] Is there a way to get a variable name as a string?

2005-07-22 Thread Daevid Vincent
What I was thinking with debug_backtrace() is that you could get the information for the function that called the function you want the variable name for, *reducing* the likelyhood of duplicate values, but admitedly not eliminating it. You could also pass the name of the variable to the

RE: [PHP] Is there a way to get a variable name as a string?

2005-07-22 Thread Daevid Vincent
He wants a function that, if you put in $x, you get out 'x' For *ANY* $variable. There is no such function. Usually the person asking it is doing something very newbie-ish, and very wrong. Actually it's not either... Since you can't easily debug when generating XML, as malformed XML

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-19 Thread Burhan Khalid
Rasmus Lerdorf wrote: Daevid Vincent wrote: Is there a way to get the name of a variable as a string? For example... Nope, not possible. Well ob_start(); echo '$var'; $contents = ob_get_contents(); ob_end_clean(); echo 'Variable Name is : '.substr($contents,strpos($contents,'$')+1);

[PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Daevid Vincent
Is there a way to get the name of a variable as a string? For example... Function myname ($foo) { echo the variable name passed in is .realname($foo); } myname($bar); I want to see printed out: the variable name passed in is bar ^^^

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Ryan A
Maybe something like: Function myname ($foo) { $return_value=the variable name passed in is .$foo; return $return_value; } echo myname($bar); Just a guess. On 7/19/2005 3:27:57 AM, Daevid Vincent ([EMAIL PROTECTED]) wrote: Is there a way to get the name of a variable as a string? For

RE: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Daevid Vincent
the contents $$foo; } Myname('bar'); Which is pretty lame. -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Monday, July 18, 2005 6:57 PM To: [EMAIL PROTECTED] Cc: php Subject: Re: [PHP] Is there a way to get a variable name as a string? Maybe something like

RE: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Rob Agar
hi Daevid FWIW, I was trying to do the exact same thing a while back, and came to the conclusion that it wasn't possible. Rob -Original Message- From: Daevid Vincent [mailto:[EMAIL PROTECTED] Sent: Tuesday, 19 July 2005 11:28 AM To: php-general@lists.php.net Subject: [PHP

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Rasmus Lerdorf
Daevid Vincent wrote: Is there a way to get the name of a variable as a string? For example... Nope, not possible. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Ryan A
I didnt totally understand you q in the beginning (and still dont fully), but Is there a way to get the name of a variable as a string? For example... Nope, not possible. -Rasmus the man has spoken :-D -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Edward Vermillion
Rasmus Lerdorf wrote: Daevid Vincent wrote: Is there a way to get the name of a variable as a string? For example... Nope, not possible. -Rasmus Wouldn't the name of the variable show up in a var_dump()? It would be messy, but if it's there... -- PHP General Mailing List

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Edward Vermillion
Edward Vermillion wrote: Rasmus Lerdorf wrote: Daevid Vincent wrote: Is there a way to get the name of a variable as a string? For example... Nope, not possible. -Rasmus Wouldn't the name of the variable show up in a var_dump()? It would be messy, but if it's there... Actually I

Re: [PHP] Is there a way to get a variable name as a string?

2005-07-18 Thread Tyler Kiley
function named_print($var_name) { return echo 'the variable named $var_name is set to ' . \$var_name; } eval(named_print($foo)); ;-) Tyler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   >