Re: [PHP] questions about $_SERVER

2012-02-13 Thread Stuart Dallas
. The only thing you need to bear in mind if you're going to modify them is that other code that's using them will also see your changes, so beware of knock-on effects. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Variable number of arguments problem

2012-02-12 Thread Stuart Dallas
nts must be given a default value... function my_func(&$arg1, $arg2, $arg3, $arg4 = null, $arg5 = null, &$arg6 = null) Note that passing a default value by reference was not supported prior to PHP5. All the relevant details are here: http://php.net/functions.arguments -Stuart

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Stuart Dallas
antage of the additional features of mobile devices where it makes sense because that's where the real game-changing power lies. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Stuart Dallas
rt of thinking is what resulted in goto gaining a tarnished reputation because people abused the feature. Language features don't write bad code... programmers do! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Stuart Dallas
ly based upon the size of the display. Responsive designs such as that described in the A List Apart article Mari posted are fantastic tools for achieving this goal. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] When to call mysqli::close

2012-01-31 Thread Stuart Dallas
ere. } // Clean up the statement $stmt->close(); } return $message } Also, I know this is probably just an example, but based on the function parameters either your SQL is wrong or the order of the parameters is wrong when binding, possibly both. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Re: File upload in map drive with PHP

2012-01-28 Thread Stuart Dallas
age: >> > > You can not use >action="upload_file.php?upload=1" > > together with >method="post" > > and you have to use > > > There is nothing stopping you doing this. Mixing GET and PO

Re: [PHP] Autoloading

2012-01-26 Thread Stuart Dallas
s($path)) { > require_once $path; > } > } > ?> > > As stated, when I change __autoload to spl_autoload_register I get the can't > be redeclared error. Any ideas? spl_autoload_register is a function you call, not a function you define. See the

Re: [PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Stuart Dallas
print "Dosya yüklenemedi. Tekrar deneyiniz"; > > } >print ""; > } > > ?> > > method="post"> >Select image: >

Re: [PHP] Re: Continued Problems Accessing *.php.net?

2012-01-24 Thread Stuart Dallas
according to your timescale. In the meantime please understand that nobody is getting paid to improve the NNTP server, and since it's in no way a priority it lives at the bottom of a very large pile of things to do. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] sessions and expirations and isolations

2012-01-18 Thread Stuart Dallas
g the data will be retained on the server. If you want a full description of how the session cleanup logic works I'm happy to provide it, but you should be able to work it out by looking at the descriptions of the gc_probability, gc_divisor and gc_maxlifetime settings on this page: http://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] sessions and expirations and isolations

2012-01-16 Thread Stuart Dallas
e the ini_set function to set session.cookie_path to /APP_1 or /APP_2 accordingly, before calling session_start. That will effectively isolate the sessions for the two apps in the same way that virtual directories do in ASP. Hope that makes it clearer. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sessions and expirations and isolations

2012-01-16 Thread Stuart Dallas
ared between domain names, so there is no way that two sites, or "applications", could use the same session [1]. -Stuart [1] This is not entirely true, but since it requires some nasty trickery to make it happen it's not something you need to worry about unless it sharing sessions is

Re: [PHP] how do you fund out if a mysql resource is empty?

2012-01-13 Thread Stuart Dallas
type thing? if (mysql_num_rows($result) > 0) { ... } http://php.net/mysql_num_rows And while you're there, have a browse of the function list in the left column. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Re: http_referer. what's wrong with that?

2012-01-12 Thread Stuart Dallas
/mail.aol.com/34188-111/aol-6/en-us/Suite.aspx"; > "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; One point of clarity... the browser sends the referrer header, not the page that contains the link, whether it's a simple website or an application. Websites have absolutely no control over it. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] count clicks to count most important news

2012-01-01 Thread Stuart Dallas
ol over it). If I'm interpreting the requirement correctly my solution is almost certainly overkill, and a simple Javascript solution would be more than sufficient. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Question regarding passwords/security

2011-12-22 Thread Stuart Dallas
so have access to your source code (since the web user must be able to read both), especially if you're using a shared host. If you're using a dedicated server then you should address the reason you're worried about people having access to session files first. -Stuart -- Stuar

Re: [PHP] dealing with this code $_POST['custom´]

2011-12-17 Thread Stuart Dallas
27;re doing, an array would be a lot more efficient... $saving_list_options = array( 'FR' => 148, 'EN' => 147, ); $saving_list = isset($saving_list_options[$_POST['custom']]) ? $saving_list_options[$_POST['custom']] : 152; Thinking a little beyond that, is that list of options really hard coded or do they exist elsewhere (e.g. in a database)? If they do then you really should be getting the value from there. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OOP problems

2011-12-08 Thread Stuart Dallas
construct($db = 'mysql') { require __DIR__.'/db/'.$db.'.php'; $this->db = new MySQL(); } } $test = new application('mysql'); $test->db->connect(); -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Webcal and file_get_contents

2011-12-06 Thread Stuart Dallas
On 6 Dec 2011, at 11:05, Davo Smith wrote: > On Tue, Dec 6, 2011 at 11:01 AM, Stuart Dallas wrote: >> On 6 Dec 2011, at 10:57, Davo Smith wrote: >> >>> Does anyone know if there is a simple way to convince >>> 'file_get_contents' to treat webcal u

Re: [PHP] Webcal and file_get_contents

2011-12-06 Thread Stuart Dallas
On 6 Dec 2011, at 11:05, Davo Smith wrote: > On Tue, Dec 6, 2011 at 11:01 AM, Stuart Dallas wrote: >> On 6 Dec 2011, at 10:57, Davo Smith wrote: >> >>> Does anyone know if there is a simple way to convince >>> 'file_get_contents' to treat webcal u

Re: [PHP] Webcal and file_get_contents

2011-12-06 Thread Stuart Dallas
code. > > I've done some web searching, looked through the PHP docs and had a > look through the archives here, but not managed to find anything > (sorry if I've missed anything obvious). $url = str_ireplace('webcal://', 'http://', $url); -Stuart -- Stua

Re: [PHP] Common way to store db-password of open session?

2011-12-04 Thread Stuart Dallas
read it, though. > > So how would I store it and restrict access to it? Put it outside the document root so it can't be accessed directly. The only chance of it being displayed to a user then is via a really bad mis-configuration of the web server, or an error in the code, neither o

Re: [PHP] End of session clean-up

2011-12-03 Thread Stuart Dallas
-Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On 3 Dec 2011, at 18:07, Andre Majorel wrote: > On 2011-12-03 17:41 +0000, Stuart Dallas wrote: >> On 3 Dec 2011, at 16:57, Andre Majorel wrote: >> >>> Hello all. I need to purge old records from application tables &g

Re: [PHP] End of session clean-up

2011-12-03 Thread Stuart Dallas
tead of storing them in the session? -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Common way to store db-password of open session?

2011-12-03 Thread Stuart Dallas
ed them from somewhere when the user logged in, so simply store a user identifier in the session and use that to retrieve the DB access details. You appear to be wanting to overcomplicate your application for no good reason that I can see. Beyond the fact that you think it's duplicating fu

Re: [PHP] Howto detect the hostname of the server?

2011-11-25 Thread Stuart Dallas
On 26 Nov 2011, at 00:24, Stuart Dallas wrote: > On 26 Nov 2011, at 00:14, Andreas wrote: >> Hi, >> how could I identify the server the script runs on? >> >> I've got a testserver on Windows and a remote system on Linux that need a >> couple of different set

Re: [PHP] Howto detect the hostname of the server?

2011-11-25 Thread Stuart Dallas
On 26 Nov 2011, at 00:24, Stuart Dallas wrote: > On 26 Nov 2011, at 00:14, Andreas wrote: >> Hi, >> how could I identify the server the script runs on? >> >> I've got a testserver on Windows and a remote system on Linux that need a >> couple of different set

Re: [PHP] Howto detect the hostname of the server?

2011-11-25 Thread Stuart Dallas
Hostname($full = false) { $retval = `hostname`; if (!$full) { $retval = array_shift(explode('.', $retval)); } return $retval; } -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sniping on the List

2011-11-19 Thread Stuart Dallas
ing to do with what I >> observed nor addressed in my post. > > My observations are demonstrated here: > > http://www.webbytedd.com//strtotime/index.php Your test code is flawed because strtotime returns an error when you pass it null. Your code is passing that false to getdate, which is interpreting it as an integer, which would be 0. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sniping on the List

2011-11-17 Thread Stuart Dallas
On 17 Nov 2011, at 20:17, Tedd Sperling wrote: > On Nov 17, 2011, at 11:58 AM, Stuart Dallas wrote: >> The epoch specifies the exact time that 0 represents. It makes no claims as >> far as that being the start of anything... >> >> "defined as the number o

Re: [PHP] Sniping on the List

2011-11-17 Thread Stuart Dallas
y evidence! > It's another nail in the coffin of deity constructors. Not even slightly. But none of this has anything even vaguely related to PHP. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sniping on the List

2011-11-17 Thread Stuart Dallas
On 17 Nov 2011, at 16:33, Tedd Sperling wrote: > On Nov 17, 2011, at 11:07 AM, Stuart Dallas wrote: >> On 17 Nov 2011, at 16:01, Tedd Sperling wrote: >> To all: >>> >>> Okay, so now that we have had people reply, here's my take. >>> >>>

Re: [PHP] Sniping on the List

2011-11-17 Thread Stuart Dallas
to comment on their current mathematical difficulties. Hmm. D'oh! But the point still stands: -1 !== null. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Novice MySQL problem

2011-11-14 Thread Stuart Dallas
elevant. I'm curious to know what your "well-developed sense of all of that" does when in lieu of auto-incrementing fields, and why. The only legitimate reason I've ever come across to avoid them is when you expect to need to partition data across multiple master DB servers.

Re: [PHP] Pipe To A Program

2011-11-12 Thread Stuart Dallas
f a monster :) -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ > -Original Message- From: Stuart Dallas > Sent: Saturday, November 12, 2011 6:21 AM > To: Ron Piggott > Cc: php-general@lists.php.net > Subject: Re: [PHP] Pipe To A Program > > On 12 Nov 2011, at 07:

Re: [PHP] Pipe To A Program

2011-11-12 Thread Stuart Dallas
P I use the Mailparse extension: http://php.net/book.mailparse Here's a (somewhat over-complicated) example from an old version of TwitApps when I processed Twitter email notifications: https://gist.github.com/1360403 -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] delete and recreate

2011-11-09 Thread Stuart Dallas
errors but others here may be able to help you with that. As far as your task goes it seems pretty straightforward. Use unlink() to delete the existing file if file_exists() returns true, then use touch() to create the new, empty file. Simples. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.co

Re: [PHP] session_start(), memcache taking too much resources

2011-11-07 Thread Stuart Dallas
lookup of web1/web2 being performed? Have you tried the lookup on the server? Alternatively try connecting to the memcached servers using netcat or telnet - does that exhibit the same delay? -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function.session-start in Webmaster Tools

2011-10-31 Thread Stuart Dallas
fore the session_start tag... have fixed that. Any info is > appreciated. You have PHP errors somewhere on your site. The error messages contain links that could result in those URLs. Find out what pages are linking to those URLs and check them for errors. -Stuart -- Stuart Dallas 3ft9 Ltd http://

Re: [PHP] Friday Distraction

2011-10-28 Thread Stuart Dallas
entary coming right through to >> the next Friday. >> Nice :) > >This is nothing compared to how it used to be ~2007-08. ;-P Ahh, the "good old days"! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fetchOne vs. fetchAll vs. Sql's limit

2011-10-23 Thread Stuart Dallas
buffered_query carefully before you start using it: http://php.net/mysql_unbuffered_query > 3) Finally, what is the efficient way to retrieve thousands or records which > need to be processed at once? Using LIMIT? Yes, use mysql_buffered_query, or mysql_query with limit to work through the

Re: [PHP] FW: parse error

2011-10-17 Thread Stuart Dallas
e on a black screen). As I said, get one. There are loads of free editors for all operating systems that do syntax highlighting for PHP. Get one, load the file up in that and have a look. -Stuart > From: Stuart Dallas [mailto:stu...@3ft9.com] > Sent: Thu 10/13/2011 1:43 PM > To: Da

Re: [PHP] Image Rotation Script

2011-10-15 Thread Stuart Dallas
correct, so try these changes... > $im = dirname(__FILE__).'/'.$_GET['im'].'.png'; and... > $save = dirname(__FILE__).'/cache/'.$_GET['im'].'_'.$degrees.'.png'; You also have a pretty major hole here because you're

Re: [PHP] FW: parse error

2011-10-13 Thread Stuart Dallas
ing or similar error, the highlighting should tell you where that problem is. -Stuart > From: Stuart Dallas [mailto:stu...@3ft9.com] > Sent: Thu 10/13/2011 12:04 PM > To: David Savage > Cc: php-general@lists.php.net > Subject: Re: [PHP] FW: parse error > > On 13 Oct 2011, at 18

Re: [PHP] FW: parse error

2011-10-13 Thread Stuart Dallas
nks for whatever help you can give. There is nothing wrong with the code you've posted... stuart@willow:~$ php -l test.php No syntax errors detected in test.php Which means the error is likely above that in the file. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Local variable protection

2011-10-13 Thread Stuart Dallas
ess, they'll simply be able to open your PHP file and see it there. Even if you're using something like Zend Guard, the string literal will not be difficult to extract. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Secure data management

2011-10-04 Thread Stuart Dallas
On 5 Oct 2011, at 02:16, Jeremiah Dodds wrote: > On Tue, Oct 4, 2011 at 8:10 PM, Stuart Dallas wrote: >> Prepared statements incur an additional hit against the DB server to prepare >> the statement. > > But only once, right? This could, of course, still be a downside &

Re: [PHP] Re: Secure data management

2011-10-04 Thread Stuart Dallas
On 5 Oct 2011, at 02:07, Jeremiah Dodds wrote: > On Tue, Oct 4, 2011 at 7:51 PM, Stuart Dallas wrote: >> As for the overhead I very much doubt there's much difference between that >> and the overhead of prepared statements. > > Probably not. As an aside, I'm r

Re: [PHP] Re: Secure data management

2011-10-04 Thread Stuart Dallas
On 5 Oct 2011, at 02:02, Tommy Pham wrote: > On Tue, Oct 4, 2011 at 5:51 PM, Stuart Dallas wrote: > On 5 Oct 2011, at 01:13, Tommy Pham wrote: > >> On Tue, Oct 4, 2011 at 4:49 PM, Stuart Dallas wrote: >> >> On 5 Oct 2011, at 00:45, Tommy Pham wrote: >> &

Re: [PHP] Re: Secure data management

2011-10-04 Thread Stuart Dallas
On 5 Oct 2011, at 01:13, Tommy Pham wrote: > On Tue, Oct 4, 2011 at 4:49 PM, Stuart Dallas wrote: > > On 5 Oct 2011, at 00:45, Tommy Pham wrote: > >> On Tue, Oct 4, 2011 at 4:11 PM, Stuart Dallas wrote: >> On 5 Oct 2011, at 00:04, Mark Kelly wrote: >> >&g

Re: [PHP] Re: Secure data management

2011-10-04 Thread Stuart Dallas
On 5 Oct 2011, at 00:45, Tommy Pham wrote: > On Tue, Oct 4, 2011 at 4:11 PM, Stuart Dallas wrote: > On 5 Oct 2011, at 00:04, Mark Kelly wrote: > > > Hi. > > > > On Tuesday 04 Oct 2011 at 21:39 Stuart Dallas wrote: > > > >> http://stut.net/2011/09

Re: [PHP] Re: Secure data management

2011-10-04 Thread Stuart Dallas
On 5 Oct 2011, at 00:04, Mark Kelly wrote: > Hi. > > On Tuesday 04 Oct 2011 at 21:39 Stuart Dallas wrote: > >> http://stut.net/2011/09/15/mysql-real-escape-string-is-not-enough/ > > Thanks. I followed this link through and read the full message (having missed > it

Re: [PHP] Secure data management

2011-10-04 Thread Stuart Dallas
On 4 Oct 2011, at 20:44, Jim Giner wrote: > "Stuart Dallas" wrote in message > news:da8b3499-4d11-4053-9834-68b34d030...@3ft9.com... > 1. Why are you using addslashes? > > 2. MySQL will strip one level of backslashes. > * > > > I thought you

Re: [PHP] Re: Secure data management

2011-10-04 Thread Stuart Dallas
ysql_real_escape_string() instead of addslashes() http://stut.net/2011/09/15/mysql-real-escape-string-is-not-enough/ -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Secure data management

2011-10-04 Thread Stuart Dallas
these 'slashed' vars into the database. > But when I go to phpadmin on my site the table does not contain any slashes. > > Where are they going? 1. Why are you using addslashes? 2. MySQL will strip one level of backslashes. -Stuart -- Stuart Dallas 3ft9 Ltd http:/

Re: [PHP] Sequential access of XML nodes.

2011-09-26 Thread Stuart Dallas
. You can use gzopen to open gzipped files and manually feed the data into xml_parse. Be sure to read the docs carefully because there's a lot to be aware of when parsing an XML document in pieces. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Round with money_format

2011-09-16 Thread Stuart Dallas
Oops... On 16 Sep 2011, at 16:36, Stuart Dallas wrote: > On 16 Sep 2011, at 15:58, Cyril Lopez wrote: > >> Can someone help me understand how money_format() rounds numbers ? >> >> > setlocale(LC_ALL, 'fr_FR.UTF-8'); >> $price = 12.665; >> echo

Re: [PHP] Round with money_format

2011-09-16 Thread Stuart Dallas
1], and an equivalent C script gave the same result so it's not a bug in PHP. Locales can't define rounding rules, so it's not related to that. Googling for strfmon rounding errors doesn't get any useful results, so either this is by design or it's never caused anyone a prob

Re: [PHP] PHP cron job optimization

2011-09-10 Thread Stuart Dallas
inutes. You can then watch the server and tune the number of concurrent job processors so you get the optimum balance between load and speed. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Opening Multiple Files

2011-09-07 Thread Stuart Dallas
is open I need the FOREACH (above) to parse the content which > ends with an “INSERT INTO” for a mySQL table. Look at the manual pages for glob and readdir - both will do what you need. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread Stuart Dallas
. A script that stops unexpectedly is almost certainly due to a fatal error, and if you're not seeing the error message because either of those settings are not set to display them, you're coding blind! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.

Re: [PHP] Keeping session info in $_SESSION or in database?

2011-08-15 Thread Stuart Dallas
t; As I said, I prefer working with $_SESSION instead storing data into session > table, but always wondered is that correct approach. Whatever session storage mechanism you use, you can continue to use $_SESSION. The process Chris describes in his post replaces the engine that loads and saves the contents of $_SESSION. You might want to read a lot more about how sessions work before you consider customising the storage mechanism. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Keeping session info in $_SESSION or in database?

2011-08-15 Thread Stuart Dallas
request, and serialised and written back at the end. In fact, with larger amounts of data you may find file-based storage to be faster. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] form handling

2011-08-11 Thread Stuart Dallas
ions spring to mind... 1) Combine them into one form in the HTML. 2) Run some JS on submit that combines the values into one form and submits that. 3) Use AJAX to submit the forms separately but simultaneously. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List

Re: [PHP] Using function prototypes in code

2011-08-09 Thread Stuart Dallas
trap unexpected basic types - or at > least to document what is expected. > > To confuse me a bit further, I can't find a definitive list of the > basic type names. For example, is it "integer" or "int"? The manual says... "Type Hints can only be of the o

Re: [PHP] A php bug or?..

2011-08-08 Thread Stuart Dallas
. There is one exception, if var is NULL, 0 will be returned." IOW, if you pass it a variable, that has one element, so it returns 1. An array may have 0 to many elements, and null, logically, has none. Rocket science this ain't! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -

Re: [PHP] How do I enable $_SERVER['HTTP_X_WAP_PROFILE'] or $_SERVER['HTTP_PROFILE']

2011-08-04 Thread Stuart Dallas
/gist.github.com/1124666. I haven't used it for a little while so there are probably new devices out there that it can't detect but it should give you a good starting point. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Tree menu list in php

2011-07-26 Thread Stuart Dallas
aScript appears to me as the more convenient method. I suggest you look up what the J in AJAX stands for! Pure CSS tree: http://www.thecssninja.com/css/css-tree-menu (be sure to check the browser support section). -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] default option

2011-07-18 Thread Stuart Dallas
tain HTML-like code. Choose... $value) { $selected = ''; if ($value == $market) { $selected = 'selected'; } echo '', htmlspecialchars($value.' : '.$market_name[$key]), ''; } ?> -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Your language sucks because...

2011-07-15 Thread Stuart Dallas
of a personal nature should be kept off the list!! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: Re: [PHP] What is a label?

2011-07-14 Thread Stuart Dallas
On Thu, Jul 14, 2011 at 1:37 PM, Steve Staples wrote: > On Wed, 2011-07-13 at 23:27 +0100, Tim Streater wrote: > > A valid variable name starts with a letter or underscore > > If I am not mistaken, $_1 is not a valid variable name. You are mistaken. Try it. -Stuart -- Stuart

Re: [PHP] Most popular word sorting

2011-07-13 Thread Stuart Dallas
5] => > Yeast ) > > The most popular word is “Parable”. I would like it to be the first result. > Then the second most popular word is “Lost”. > Then all the remaining words are only used once. If I'd have spent two minutes reading the array section of the manual first I

Re: [PHP] vend-bot?

2011-07-12 Thread Stuart Dallas
On Tue, Jul 12, 2011 at 2:40 PM, Kirk Bailey wrote: > > > On 7/11/2011 4:00 AM, Stuart Dallas wrote: > >> Why do you insist on not including the list when replying to me?? >> > I was attempting to be polite. Recall that I was criticizing your response, > an

Re: [PHP] vend-bot?

2011-07-11 Thread Stuart Dallas
id watermark. The legal issues aren't the main point. It doesn't matter what you watermark it with, the watermark can be removed! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On 7/7/2011 10:07 AM, Stuart Dallas wrote: > > PLEASE INCLUDE THE LIST WHEN REPLYING! > > On

Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Stuart Dallas
9480af637e53c7aae823a40a131edc1343db5. That means you can't simply download from that URL, you'll need to programatically log into the website, find the link and then do the download. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Stuart Dallas
PulledPork to update the rules since it seems to be the officially supported method? PHP can shell out to a Perl script in exactly the same way it can shell out to wget. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Stuart Dallas
you want. This has nothing to do with PHP (did it ever?), so I suggest you find a snort mailing list and ask there. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] vend-bot?

2011-07-07 Thread Stuart Dallas
to the card holder, is prohibited. Legal issues aside, it's still just bits and bytes. Watermarks can be removed. Now, what do I win? -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On 7/6/2011 8:28 PM, Stuart Dallas wrote: > > Again, please include the list when replying. > >

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
Again, please include the list when replying. On Thu, Jul 7, 2011 at 1:06 AM, Kirk Bailey wrote: > ** > > > On 7/6/2011 6:08 PM, Stuart Dallas wrote: > > Please include the list when replying. > > On Wed, Jul 6, 2011 at 10:20 PM, Kirk Bailey wrote: > >> Um,

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
s want to share the asset(s) they're downloading, they will. Nothing you can really do about that. > On 7/6/2011 4:34 PM, Stuart Dallas wrote:If you read back you'll note I > said "generate a unique token linked to their account." At no point did I > say the to

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
On Wed, Jul 6, 2011 at 6:16 PM, Kirk Bailey wrote: > ** > > On 7/6/2011 9:31 AM, Stuart Dallas wrote: > > On Wed, Jul 6, 2011 at 3:01 AM, Kirk Bailey wrote: >> >> >> On 7/3/2011 4:53 PM, Stuart Dallas wrote: >> >>> Only allowing them to access t

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Stuart Dallas
On Wed, Jul 6, 2011 at 8:25 PM, Jim Giner wrote: > > "Stuart Dallas" wrote in message > news:e73bd95e-0524-4743-92be-ae211b57e...@3ft9.com... > On 6 Jul 2011, at 20:03, "Jim Giner" wrote: > > Frankly, I don't know why you are getting mail from me - I

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Stuart Dallas
On 6 Jul 2011, at 20:03, "Jim Giner" wrote: > Frankly, I don't know why you are getting mail from me - I'm not sending you > any. FFS and for the last time... THIS IS A MAILING LIST which you access through a newsgroup gateway. It is NOT a newsgroup! -Stuart -- S

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
On Wed, Jul 6, 2011 at 3:01 AM, Kirk Bailey wrote: > > > On 7/3/2011 4:53 PM, Stuart Dallas wrote: > >> Only allowing them to access the URL once is a bad idea. If their download >> fails, is corrupt, or any number of other things go wrong (think >> accelerators, b

Re: [PHP] Constants in strings

2011-07-06 Thread Stuart Dallas
hat the preceding $ causes PHP to interpret the next token "{XYZ}" as a variable or a constant, but without that preceding $ it has no way to know you're trying to use a constant. As Curtis points out, the only way to insert a constant into a string is through concatenation. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] XML array

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 6:43 PM, Tamara Temple wrote: > > On Jul 5, 2011, at 10:47 AM, Stuart Dallas wrote: > > >> $arr[] = array('name' => (string)$book->name, 'author' => >> (string)$book->author); >> } >> > > Interesti

Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 5:10 PM, Jim Giner wrote: > "Stuart Dallas" wrote in message > news:CAJgGj58OkZLiakMMo8qmuhg68BamYOi+TLNGyzze=iyppbj...@mail.gmail.com... > > Again, please include the list when replying! > > > > But don't include the poster's

Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
-worthy amount of time! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 4:48 PM, Jim Giner wrote: > > "Stuart Dallas" wrote in message > > If you're looking for a sane reason why Microsoft software is popular in > > the > > business world you're not going to find one. > > > No - you missed m

Re: [PHP] XML array

2011-07-05 Thread Stuart Dallas
itable? what should i do for resolve my problem? the the title 7-6-2011 book 1 author 1 book 2 auther 2 END; $xml = simplexml_load_string($data); $arr = array(); foreach ($xml->data->book as $book) { $arr[] = array('name' => (string)$book->name, 'author' => (string)$book->author); } var_dump($arr); ?> -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Top Posting

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 3:29 PM, wrote: > Anyone know how to make Outlook changes its reply position. > > I am using outlook 2007 and I do not find an option for this. > Google delivers... http://sourceforge.net/apps/mediawiki/macros4outlook/index.php?title=QuoteFix_Macro -Stuart

Re: [PHP] Foreach question

2011-07-05 Thread Stuart Dallas
ext item in the array is calculated after evaluating the condition but before executing that loop. Thus, with a single array element it decides it's at the end of the array before the first loop. My C is a little rusty so I might have the details slightly wrong, but that's the crux of wh

Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
ng in the business world annoys me just as must as bottom posting annoys you in this world. One final thing... you keep calling this a newsgroup. The PHP mailing lists are mailing lists first, and a newsgroup second - that's kinda why they're called the PHP mailing lists. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-04 Thread Stuart Dallas
because you usually cannot tell what OS the computer you're talking to is running. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-03 Thread Stuart Dallas
the various protocols used on the internet, not the PHP manual which I believe you think I meant. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] PHP EOL

2011-07-03 Thread Stuart Dallas
you accept" - if it wasn't like that the internet would fall apart. I encourage you to do your part to do things right, but it's completely up to you if you don't want to follow the users' manual. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On Jul 2, 2011, at 8

Re: [PHP] vend-bot?

2011-07-03 Thread Stuart Dallas
. They come back from PayPal to a script that sets up their unique URL, then you take them to that URL. KISS it - the more complicated you make this the worse the user experience will be and it won't be any more secure than a time-limited unique token as described above. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] PHP EOL

2011-07-02 Thread Stuart Dallas
mented mail servers (rare these days, but it happens). Incidentally, CR only applies to Mac OS9 and earlier. OSX uses LF due to its BSD roots. For a near-complete list, see "Representations" here: http://en.wikipedia.org/wiki/Newline. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] best ways to recruit volunteers for a PHP framework

2011-06-28 Thread Stuart Dallas
e - let them discover/decide how worthy your project is of their attention and efforts on their own. That's the only way to build a quality bunch of contributors. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

<    1   2   3   4   5   6   >