Re: [PHP] Improving development process / help with developer setup

2008-05-19 Thread Richard Heyes
Or depending on your budget, Switch the developers to Macintosh computers, install windows via parallels, and then you can test in Mac/Unix/Windows all from 1 computer :) And watch everyone quit... :-) -- Richard Heyes ++ | Access SSH with a Windows

Re: [PHP] Improving development process / help with developer setup

2008-05-19 Thread Richard Heyes
as an SSH account). http://www.phpguru.org/sftpdrive -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.ph

Re: [PHP] String searching

2008-05-17 Thread Richard Heyes
anything and the second part must be only in the set described above. What is the easiest way to do this? There's something here, imaginatively called blah(), which does what you require: http://www.phpguru.org/preg/example.phps -- Richard Heyes ++ | A

Re: [PHP] Threads PHP

2008-05-16 Thread Richard Heyes
Check out: http://pecl.php.net/package/threads That might help you out. > Summary: experimental implementation of threads The word "experimental" makes me shudder. If you can (ie you're using *nix), you could also investigate the pcntl extension - http://php.net/pcntl

Re: [PHP] validating textarea using php

2008-05-14 Thread Richard Heyes
Dotan Cohen wrote: 2008/5/14 Richard Heyes <[EMAIL PROTECTED]>: Any host that upgrades the PHP version (a major upgrade considering it would be 5 - 6) without notifying Customers isn't a very good hosting company, and you really should change to a better one (Rackspace are good).

Re: [PHP] validating textarea using php

2008-05-14 Thread Richard Heyes
;s not even out yet in beta and therefore not worth my time considering. ISTR having read something about a 5.3 release, which I read would have namespaces. That needs consideration before any PHP6 release. -- Richard Heyes ++ | Access SSH with a W

Re: [PHP] validating textarea using php

2008-05-13 Thread Richard Heyes
Jim Lucas wrote: Richard Heyes wrote: Also you can use short tags (popular...) to make the HTML more readable. Eg: It also makes the code less portable. If that's even a concern. A lot of the time, it's not. -- Richard Heyes +

Re: [PHP] validating textarea using php

2008-05-13 Thread Richard Heyes
a variable is just whitespace. $comments = trim($_POST['comments']); if ($comments == '') { // Show error message } -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| +---

Re: [PHP] usort inside a class

2008-05-09 Thread Richard Heyes
i)" gaves the following error: usort() [function.usort]: Invalid comparison function i tried to do "usort($this->arr, 'cmpi')" but it does not work either. If it's anything like other functions, try this: usort($this->arr, array($this, 'cmpi'));

Re: [PHP] quick question

2008-05-09 Thread Richard Heyes
Well, when I try date('d/m/y', strtotime($_POST('date')) - it seems mixing day and month, I tried setlocale(LC_ALL, 'en_GB'); but it didn't strtotime() returns a unix timestamp (ie number of seconds since 1970ish. Nothing to do with

Re: [PHP] quick question

2008-05-09 Thread Richard Heyes
Ho to read date from HTML form -> How to read $_POST['date']="dd/mm/" string variable as a date? If you want a unix timestamp then try investigating strtotime(). -- Richard Heyes ++ | Access SSH with a Windows m

Re: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Richard Heyes
It won't work? No idea, it was just a rather poor play on words. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List

Re: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Richard Heyes
Perhaps touch might help. Touch my ass. ROFLMAO (I've been waiting for years to use that one) -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -

Re: [PHP] Handling Incoming Email Attachments

2008-05-06 Thread Richard Heyes
validate the attachments and do not rely on the MIME-type only. People can spoof that kind of files. There's also the PEAR mimeDecode class as well. A PHP solution so it won't require you to reconfigure/compile anything. -- Richard Heyes ++ |

Re: [PHP] Re: Where to start!

2008-05-05 Thread Richard Heyes
Then surely "designed well" would include a normalised database? Not necessarily. You could for example have a database that accommodates future needs without being completely normalised. -- Richard Heyes ++ | Access SSH with a Windows ma

Re: [PHP] Re: Where to start!

2008-05-05 Thread Richard Heyes
on the tail of a snake. Alternatively you make a solution that fulfils the requirements of the customer, without being "cheap and cheerful" and is designed well to accomodate future modifications, and make it resolutely clear that any future modification may take longer since schema changes ma

Re: [PHP] Where to start!

2008-05-05 Thread Richard Heyes
> | na_acid | na_foo | +-++ How's that for ASCII art? :-) -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php

Re: [PHP] Re: Where to start!

2008-05-05 Thread Richard Heyes
ion and never try to expand it, chances are you don't need to, so what's the advantage in throwing it away and generating work for yourself in reproducing it? -- Richard Heyes ++ | Access SSH with a Wi

Re: [PHP] Re: Where to start!

2008-05-05 Thread Richard Heyes
chore to maintain I suppose (which you could say, is more than one...). -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (htt

Re: [PHP] Re: Where to start!

2008-05-05 Thread Richard Heyes
ating data (too much), but shouldn't be a requirement. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.n

Re: [PHP] Re: Where to start!

2008-05-05 Thread Richard Heyes
Tony Marston wrote: "Richard Heyes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] The database must be properly normalised otherwise it will be difficult to get at the data you need in an efficient manner. Not true. If your needs are simple for example, normalisat

Re: [PHP] Re: Where to start!

2008-05-05 Thread Richard Heyes
ple you could use something like a SET type, and search for something in it using FIND_IN_SET(). -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ --

Re: [PHP] retrieve email address

2008-05-04 Thread Richard Heyes
. There's also a shortcut function for just matching an Interweb email address. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing

Re: [PHP] web based chat app

2008-05-04 Thread Richard Heyes
that could be removed by using AJAX to drag down the latest page instead of refreshing the whole page. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ --

Re: [PHP] web based chat app

2008-05-04 Thread Richard Heyes
IRC server). http://www.phpguru.org/chat/chat.php -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] set_error_handler help

2008-05-02 Thread Richard Heyes
se. Eg. $obj = new ErrorHandlingObject(); set_error_handler(array($obj, 'myMethod')); -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing

Re: [PHP] Categories like wordpress

2008-05-01 Thread Richard Heyes
y it's more flexible...? The latter two solutions I suggested are certainly easier to work with and (with todays hardware), speed isn't always a factor. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |ht

Re: [PHP] Categories like wordpress

2008-05-01 Thread Richard Heyes
function FIND_IN_SET() will be very useful. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] check if any element of an array is not "empty"

2008-05-01 Thread Richard Heyes
i dont really see how that gets him the answer without at least checking the number of elements in the array after filtering it w/ array_filter; which if he wanted to reuse in several places would make sense to write a simple function for anyway.. Yes, on both counts. -- Richard Heyes

Re: [PHP] check if any element of an array is not "empty"

2008-04-30 Thread Richard Heyes
but I was thinking if there is the function does that. array_filter(). Note this: "If no callback is supplied, all entries of input equal to FALSE (see converting to boolean) will be removed." http://uk3.php.net/manual/en/function.array-filter.php -- Ric

Re: [PHP] php framework vs just php?

2008-04-22 Thread Richard Heyes
;framework". -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Denver PHP opportunity - Senior Software Engineers

2008-04-21 Thread Richard Heyes
The commute would be a killer, Richard. LOL. I think you're right. A 60 mile commute caused me to quit a job, so several thousand miles sounds excessive... :-) -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpgur

Re: [PHP] Denver PHP opportunity - Senior Software Engineers

2008-04-21 Thread Richard Heyes
Web 2.0 *and* profitable? Surprising. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Check RAW data

2008-04-20 Thread Richard Heyes
fixed now though because it was some time ago. But that doesn't mean to say more won't be found. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++

Re: [PHP] Check RAW data

2008-04-20 Thread Richard Heyes
I don't believe malicious code can be executed with echo and header. The header of the PNG file, not a HTTP header. -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftp

Re: [PHP] Most viewed?

2008-04-17 Thread Richard Heyes
are an IP with a few hundred other people so that all of them combined only get counted one time. Because of this if it's not too important (eg it's just ratings of articles) personally I would choose the cookie method. If it's uber important you could have the user login before they

Re: [PHP] Database abstraction?

2008-04-17 Thread Richard Heyes
And since no word in the English language begins with FT You're forgetting Ftork... -- Richard Heyes +-+ |Access SSH through a Windows mapped drive| |http://www.phpguru.org/sftpdrive | +-+ -- PHP Ge

Re: [PHP] Database abstraction?

2008-04-17 Thread Richard Heyes
> SASH That should have been SSH of course - seems my spell checker isn't very technical... -- Richard Heyes +-+ |Access SSH through a Windows mapped drive| |http://www.phpguru.org/sftpdrive | +-+

Re: [PHP] Database abstraction?

2008-04-17 Thread Richard Heyes
it take me 5 minutes :) For the record, it was exactly five minutes. What was? -- Richard Heyes +-+ |Access SASH through a Windows mapped drive| |http://www.phpguru.org/sftpdrive | +-+ -- PHP General M

Re: [PHP] Database abstraction?

2008-04-16 Thread Richard Heyes
reattached it for him... :-) -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Database abstraction?

2008-04-16 Thread Richard Heyes
egister_globals crapola). Credit also due to Stephan Esser. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Database abstraction?

2008-04-16 Thread Richard Heyes
ball park? Hopefully it makes sense... Cause it's right on the edge of my knowledge so I'm not totally sure how to ask it right yet :) You could do it adequately with a DESCRIBE, but there might be something that's "better". I would suggest looking through the code

Re: [PHP] PHP Serialization Performance

2008-04-16 Thread Richard Heyes
this is to you), the quickest to implement would be a combination of serialize(), unserialize(), file_put_contents() and file_get_contents(). Using these functions you could very quickly create a persistent cache for data. It might be quicker though to use a cache that's already out there.

Re: [PHP] standard format for Web portal administration side

2008-04-14 Thread Richard Heyes
n't really take any more time. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Evaluating math without eval()

2008-04-10 Thread Richard Heyes
to take advantage of other functions like ceil, floor etc. So the string "18-10" should give me 8, "ceil(1/2)*10" should be 10 (if my maths is correct) and the string "18-10;\r\nunlink('/var/www/*');" should not execute. If you can provide your users with d

Re: [PHP] objects stored in sessions

2008-04-07 Thread Richard Heyes
to unserialize data ? The question(s) should be "Why would you want PHP4 to read a PHP5 session?" and "Why would you expect it to work?". If you want to transfer data between versions you may want to investigate XMLRPC. Or perhaps the somewhat more verbose SOAP. -- Ric

Re: [PHP] objects stored in sessions

2008-04-06 Thread Richard Heyes
, otherwise you will encounter problems. Or alternatively use __autoload() to allow the class code to be loaded when you start the session. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to jump to line number in large file

2008-04-05 Thread Richard Heyes
line, so you can use this wondrous fact to seek to a specific line: It works because fgets() stops when it encounters a newline (\n). So it's just a case of counting the calls to fgets(). -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Richard Heyes
s for Javascript. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] everything as classes

2008-04-03 Thread Richard Heyes
;d have the code to show listings. With common code on the parent movie listings class and with specific code on the appropriate child class. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] autoload with namespace

2008-04-02 Thread Richard Heyes
err-um sorry for the noise; actually the namespaces work w/ functions as well. So not OO specific? Is there anything I can read that describes them? -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] autoload with namespace

2008-04-02 Thread Richard Heyes
Playing around with dev PHP 5.3 and namespaces PHP 5.3 will have namespaces? -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Planet PHP broken?

2008-03-30 Thread Richard Heyes
Hey, As the subject says really. Last thing it has seems to be "PEAR on a Shared Host" dated the start of the 27th. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simple RegEx to pull out content between 2 markers

2008-03-29 Thread Richard Heyes
xt, $matches); $main = preg_match('/(.*)/is', $text, $matches); And then, IIRC, the content you're after will be in $matches[1]. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array_filter function

2008-03-28 Thread Richard Heyes
gt;array('type'=>'da'),2=>array('type'=>'da')) Off the top of my head: $v) { if (!empty($v['type']) AND $v['type'] != 'da') { unset($newDataArray[$k]); } } ?> Optionally, you coul

Re: [PHP] Re: Quick email address check

2008-03-27 Thread Richard Heyes
with this separately. Is there a better way than simply sending a test email to see if it bounces? The Mail/RFC822 class in PEAR has a quick(er) static method for checking the format of an Interweb email address. Mail_RFC822::isValidInetAddress() IIRC -- Richard Heyes Employ me: http:/

Re: [PHP] restricting access to folders on server

2008-03-24 Thread Richard Heyes
oot directory or specific directories. If you put that in .htaccess file, it will apply to that directory and any subdirectories. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Checking how many letters are in a string.

2008-03-19 Thread Richard Heyes
at count_chars and considered writing a wrapper function for each of the 27 letters of the Hebrew alphabet, but I am quite sure that there is a cleverer method. Any ideas? You may want to investigate mb_strlen(): http://uk.php.net/mb_strlen -- Richard Heyes Employ me: http://www.phpguru.org/cv

Re: [PHP] selling gpl software?

2008-03-19 Thread Richard Heyes
terms that grant you permission to use and redistribute the software. If you add to it, it stops being the GPL. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] selling gpl software?

2008-03-19 Thread Richard Heyes
ainst the gpl software. he want me to remove all the link and powered by link (anything visible to the end user) Which you can do (IIRC). -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Double click problem

2008-03-19 Thread Richard Heyes
when complete redirects to the "thank you" page. ie. Form --> "Please wait..." page --> "Thank you" page -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
a / are taken to be relative to the current documents path. You (probably) want this: The forward slash at the start causes your browser to ignore whatever your current path is, albeit remain on the current domain. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP Genera

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
LF'] which will give you the path to the script or $_SERVER['REQUEST_URI'] (you will probably have to remove the query string with this), along with either dirname(). -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Objects as array key names??

2008-03-16 Thread Richard Heyes
anual/en/language.oop5.magic.php -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is this the best way?

2008-03-14 Thread Richard Heyes
$authenticated = "TRUE"; Like above, I would advise using booleans (true/false) and not strings (text): $authenticated = true; // Note the lack of quote marks -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Last Friday of every month

2008-03-14 Thread Richard Heyes
r variable. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Intercepting errors

2008-03-13 Thread Richard Heyes
Oh and Stephane: this is a mailing list. If you want off you can go to http://www.php.net. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Intercepting errors

2008-03-13 Thread Richard Heyes
/manual/en/function.set-error-handler.php -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Richard Heyes
Greg Donald wrote: On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote: That's not quite the situation. Finding good developers isn't easy, so lots of companies will go for "acceptable" ones, who are less likely to know of __autoloads existence. Hence, using __auto

Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Richard Heyes
know of __autoloads existence. Hence, using __autoload is unwise. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Richard Heyes
t's a perfectly viable business reason. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] best practices in error handling in PHP

2008-03-12 Thread Richard Heyes
about error handling. Aren't they all? :-/ -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Richard Heyes
xample a junior developer who doesn't know of its existence and is new to a job is less likely to admit ignorance and ask how a class is being defined when __autoload() is being used. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] setcookie

2008-03-12 Thread Richard Heyes
, including whitespace. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] /?feed=rss2

2008-03-11 Thread Richard Heyes
> A stroke less than two weeks before your twenty-ninth birthday. Five months. Close though... :-) -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] /?feed=rss2

2008-03-11 Thread Richard Heyes
...which is kinda funny b/c right here he says to "Employ me". Not with double typos like that, Mr.!! =D Oopsy. Sight is a funny thing... http://www.phpguru.org/article.php/102 -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.ph

Re: [PHP] save image in database vs folder

2008-03-11 Thread Richard Heyes
hard drive and store the file name in the database. If for whatever reason you can't or don't want to do that, then at least store it in a separate table that only gets touched when the image is requested. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing

Re: [PHP] /?feed=rss2

2008-03-11 Thread Richard Heyes
> /etch/hosts Typo. That should be: /etch/hosts -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] /?feed=rss2

2008-03-11 Thread Richard Heyes
up your hosts file (typically /etch/hosts on *nix, c:\windows\system32\drivers\etc\hosts on Windows) and add a line that reads: 127.0.0.1 www.foo.com That way your PC (only your PC) will think that www.foo.com is local, and not go over the Interweb for it. -- Richard Heyes Employ me: http

Re: [PHP] send form by email with image spam controler

2008-03-09 Thread Richard Heyes
er is 4022. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Pear Installation Problem - Ubuntu

2008-03-06 Thread Richard Heyes
o you may be better off with a single file while you get it up and running. Something like Console_Table. So, you would create this dir: /usr/local/share/pear/Console and in that place the file Table.php Then in your app you can do this: require_once('Console/Table.php'); -

Re: [PHP] Preserving URL after redirect?

2008-03-05 Thread Richard Heyes
So, my question is how would I do that, and I strongly suspect if it's possible at all an .htaccess file with the proper entries would be the way to do it, not using PHP code to redirect as I am now. Is this the case? You would need to use mod_rewrite. -- Richard Heyes Employ me:

Re: [PHP] RewriteRule help

2008-03-01 Thread Richard Heyes
ript 2. Use the Apache directive to make it be parsed as a PHP script (http://www.phpguru.org/article.php/212) 3. Then in the "user" file you can use the $_SERVER['REQUEST_URI'] to ascertain the correct content to show. -- Richard Heyes (wondering if he's getting a

Re: [PHP] string effect

2008-03-01 Thread Richard Heyes
// String short enough already ? if (strlen($str) <= $length) { return $str; } $str = substr($str, 0, $length); // No body intentionally for ($i=$length - 1; !ctype_space($str{$i}) && $i > 0; --$i); return rtrim(substr($str,

Re: [PHP] Making sure an include file works

2008-02-29 Thread Richard Heyes
and is_readable for some basic checking, and hope that the included files have no syntax errors. Hoping something works leads you down the path of severely broken code. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Text Color

2008-02-29 Thread Richard Heyes
echo "".$myrow["char_name"]."".$myrow["char_level"]."".$class["class"]."".$myrow["kara"]."".$myrow["karateam"]."".$myrow["karasub"]; Either CSS styling or th

Re: [PHP] simple command help

2008-02-29 Thread Richard Heyes
u're on Windows you'll need someone else... :-) -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] reverse string without strrev();

2008-02-28 Thread Richard Heyes
Sorry, Rob, that function doesn't return anything. ;-) It's not meant to: -- Richard Heyes Employ me (!): http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What design patterns do you usually use?

2008-02-27 Thread Richard Heyes
What design patterns do you usually use? Whatever solves the problem. Factory is quite a common one. MVC is another. -- Richard Heyes http://www.phpguru.org Free PHP and Javascript code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do you send stylized email?

2008-02-26 Thread Richard Heyes
essage, 'Content-Type: text/html'); If you want to send multipart text/HTML emails, have a look at my website for the HTMLMimeMail class which greatly simplifies this. -- Richard Heyes http://www.phpguru.org Free PHP and Javascript code -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] URL modification

2008-02-25 Thread Richard Heyes
I think this is a highly underused built-in feature. Agreed. I started to use it on my blog instead of a query string and pages reported by Google went up. -- Richard Heyes http://www.phpguru.org Free PHP and Javascript code -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] PHP 24 hour processes?

2008-02-25 Thread Richard Heyes
create file eg cron.txt Or if your version of crontab supports it (not all do) then you can use: crontab -e And to get the manual page, you can do this: man 5 crontab -- Richard Heyes http://www.phpguru.org Free PHP and Javascript code -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] URL modification

2008-02-23 Thread Richard Heyes
like this: /rental.php/property/23425 -- Richard Heyes http://www.phpguru.org Free PHP and Javascript code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date Function

2008-02-23 Thread Richard Heyes
$start_date = date("Y-m-d h:i:s", strtotime($date_format)); echo $start_date; ?> output is 2008-02-22 02:00:00 but not 2008-02-22 14:00:00 How can i get my output as 2008-02-22 14:00:00. Use H instead of h. And try the manual. -- Richard Heyes http://www.phpguru.org Free PHP a

Re: [PHP] URL modification

2008-02-23 Thread Richard Heyes
ou honestly not use mod_rewrite in anything you've made? No. -- Richard Heyes http://www.phpguru.org Free PHP and Javascript code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] URL modification

2008-02-22 Thread Richard Heyes
r htdocs called /profile/adam and in that place a default document redirecting. Still no need for mod_rewrite. Unless of course you want the url to remain in the addressbar, but personally I don't think that is as important as what the user has to type in initially. -- Richard Heyes http://www.

Re: [PHP] URL modification

2008-02-22 Thread Richard Heyes
/login The trailing slash is not necessary if login is a directory. For example: http://www.websupportsolutions.co.uk/demo -- Richard Heyes http://www.phpguru.org Free PHP and Javascript code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] www. not working

2008-02-21 Thread Richard Heyes
Spider webs have existed for many a year... Not long before the eggs hatched. Debatable. -- Richard Heyes http://www.websupportsolutions.co.uk Knowledge Base and Helpdesk software hosted for you - no installation, no maintenance, new features automatic and free -- PHP General Mailing

Re: [PHP] www. not working

2008-02-21 Thread Richard Heyes
st time you saw porn on one of them?!! Now that would be telling. :-) -- Richard Heyes http://www.websupportsolutions.co.uk Knowledge Base and Helpdesk software hosted for you - no installation, no maintenance, new features automatic and free -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] www. not working

2008-02-20 Thread Richard Heyes
"A form" of the web existing long before that depending on your definition of the web. To me it's a way for people to share information. That would cover the BBS world which pre-dates LANs by some distance. Spider webs have existed for many a year... -- Ric

<    1   2   3   4   5   6   7   8   9   >