Re: [PHP] Re: Help: Validate Domain Name by Regular Express
tedd wrote: At that time, I registered almost 30 names. Fortunately, all of my names passed and I was permitted to keep them. Unfortunately, all browser manufactures (except Safari) negated some of the work done by the IDNS WG and as a result PUNYCODE is shown instead of the actual characters intended. Only for characters that are not part of a national alphabet, I believe? This one works fine: http://rugbrød.ch/ Besides, many domain registrars also limit the available characters to those that are part of a national alphabet. -- Per Jessen, Zürich (0.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] First PHP job
[snip] or the ($needle, $haystack) vs ($haystack, $needle)... i still get it screwed up... thankfully php.net/{function_name} is easy to use :P Oh hell yeah! I know there's a rule about it. I just don't know what it is. [/snip] I am always looking for the $needle in the $haystack. Just sayin' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [BOGO?]RE: [PHP] First PHP job
On Tue, Jan 11, 2011 at 06:19:32AM -0600, Jay Blanchard wrote: [snip] or the ($needle, $haystack) vs ($haystack, $needle)... i still get it screwed up... thankfully php.net/{function_name} is easy to use :P Oh hell yeah! I know there's a rule about it. I just don't know what it is. [/snip] I am always looking for the $needle in the $haystack. But sometimes I have to look through the $haystack for the $needle. ;-} Paul -- Paul M. Foster http://noferblatz.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Craigslist Jobs
Dear List - I am a NEWBIE, so . How do I handle Craigslist postings? Is there anything special I should do? Any advice for other web sites? At this point I am talking about small jobs. 1] My payment. Should I ask for something up front? If so how much? 2] How do I protect myself so that I do not deliver code and not get paid. 3] What is a reasonable hourly rate? 4] Any other information that I should know? Many thanks. Ethan MySQL 5.1 PHP 5.3.3-6 Linux [Debian (sid)] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Craigslist Jobs
Like any other job, have a portfolio to show your skills. Most people who are posting on craigslist will be stunned by just about any work, but it helps in case you happen to get an educated contact who wants to see what you've done. Some references may also be helpful. 1) There's no right or wrong about this. If you have no references, then don't ask for something up front because that would set off alarms in anyone's head. 2) Once the cat is out of the bag, its out of the bag. If you send them the code and they don't pay you, your option is to go after them in court. 99.9% it's not worth the time. You could also call in a criminal complaint for theft, but it'd be tough to make it stick. Call it a wash and move on. It sucks, I know. If you keep in a back door or somehow break it, depending where you are, it falls squarely into the realm of computer crimes. 3) How much is your time worth? It's a really difficult question. Look around. Call up some of the competition with bogus projects and see what they'd charge, and then what they'd deliver. Will you be offering more or less than what they do? Gauge accordingly. Also it could vary based on the customer. Whenever I do consulting work I always make it a habit not to charge nonprofits. I get a feelgood out of it, and some nice tax write offs. 4) Learn basic finances. Keep organized. Track everything. And most of all, have fun. On Tue, Jan 11, 2011 at 10:33 AM, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - I am a NEWBIE, so . How do I handle Craigslist postings? Is there anything special I should do? Any advice for other web sites? At this point I am talking about small jobs. 1] My payment. Should I ask for something up front? If so how much? 2] How do I protect myself so that I do not deliver code and not get paid. 3] What is a reasonable hourly rate? 4] Any other information that I should know? Many thanks. Ethan MySQL 5.1 PHP 5.3.3-6 Linux [Debian (sid)] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: First PHP job
On Jan 11, 2011 4:32 PM, Gary php-gene...@garydjones.name wrote: Steve Staples wrote: or the ($needle, $haystack) vs ($haystack, $needle)... i still get it screwed up... Given that, for example, array_search and strstr take those arguments in different orders, that's not really surprising. Something tells me that's what he meant ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help: Validate Domain Name by Regular Express
Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Like 163.com or 126.net which are legal names. Oh I should mention that I block ANY mails from this two domains since chinese spamers use it excessively. Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
[PHP] Re: Re: Help: Validate Domain Name by Regular Express
Hello Per Jessen, Am 2011-01-09 12:15:04, hacktest Du folgendes herunter: Tamara Temple wrote: I'm wondering what mods to make for this now that unicode chars are allowed in domain names You're talking about IDNs ? The actual domain name is still US-ASCII, only when you decode punycode do you get UTF8 characters. And here is, where the hell starts... Each country, which offer IDN has its own rules e.g. DE != AT even both is german. I am Domain-Reseller and had to implement a checker which does validate ALL TLDs offered by my service. And realy it IS not funny! Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
[PHP] Re: Re: Help: Validate Domain Name by Regular Express
Hello Tedd, Am 2011-01-10 11:39:16, hacktest Du folgendes herunter: IOW, an email address of t...@.com is perfectly legal (and will work), but no email application will allow it. Hahaha, how many MUA have you checked? My one does support ist. mutt: Installiert: 1.5.20-5~bpo50+1 Kandidat: 1.5.20-5~bpo50+1 Versions-Tabelle: *** 1.5.20-5~bpo50+1 0 600 http://www.backports.org lenny-backports/main Packages 100 /var/lib/dpkg/status 1.5.18-6 0 900 ftp://ftp2.de.debian.org lenny/main Packages Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
Re: [PHP] Command line PHP
On 7 January 2011 16:55, la...@garfieldtech.com la...@garfieldtech.com wrote: Hi folks. I have a project coming up that will involve writing a non-trivial command line PHP application. Most of it will be nice and abstracted and standalone and all of that jazz, but it will need to do command line interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield Hello Larry, Sorry for being late to the game. I use PHP on Windows and I use PHP CLI for nearly everything I do that isn't web based. Occasionally I'll use a .BAT file, but invariably, I need logging and reporting, etc. I get all of that from pre-existing PHP classes, so a no brainer in that regard. I co-maintain the PEAR Console_CommandLine package [1]. This allows quite complex command line argument setups. At the bottom of this post, I've included the help screen from an app. Long/short options all catered for. commands can have their own options/arguments too (so script command --help would show that command's help). If you are on windows, take a look at PHP command line usage on windows [2] to make things a lot easier for yourself. The app shows me differences in source files between different servers (live, dev, test, etc). To get values during run time from the console, I use (in the most basic of example), fgets(STDIN); As PHP on windows requires an [ENTER] key to be pressed to pass the typed string to the code (even for fgetc(STDIN) ), then this may not be what you want. Try this ... php -n -r echo fgetc(STDIN); If you can then press 1 letter and see 2 copies of it and the program quits, then that's it - in a nutshell. On windows, I have to press [ENTER]. If I type abc[ENTER], then only the a is returned and the bc is buffered somewhere. php -n -r echo fgetc(STDIN), fgetc(STDIN); shows the buffering. I also use Jason Hood's ANSICON [3] (full source available), which allows me to output coloured text in PHP using a simple home-brew class (ANSI::Write($text, $foreground = null, $background = null)). If you build phpdoc using PhD and enable the coloured output, all looks great with ANSICON. ANSICON supports quite a few of the non colour related ANSI code sequences (cursor positing, inserting/deleting lines/characters/etc.), so maybe doing things like drawing windows, boxes, menus, etc. could all be done using just ANSICON. It would be a LOT of work for probably not a lot of users. As far as I know, there are no libraries for PHP on windows allowing you to do this sort of thing from the command line. I know of curses (ncurses ?), so if you are on something other than windows, these are an option for colour processing. As for pushing the envelope ... I run multiple PHP scripts as Windows Services using the pecl extension win32service [4], implementing multiple threads using ... $WshShell = new COM(WScript.Shell); $WshShell-Run(...); and have shared memory via WinCache [5]. All command line scripts in essence. Why? Well. I know PHP quite well. I understand the 2 extensions very well. I can re-use all my existing code/frameworks. And I can fit these service into the environment in such a way that the system admins/sysops only see these tasks as normal windows services. If they need to reboot a server bank, the scripts shutdown automatically, appropriately and correctly and restart after the reboot. I'm just working on adding dependency to the services so that if (for example) they take down the mail server for some reason, any of the PHP services requiring mail will also close down correctly. Just as if you had a real service. And, once I'd found the solution and documented it, using PHP scripts as command line filters, allows you to do some pretty complex argument chaining. collect --source internet | filter email | updateDB --server x --user y --password z | generateReports --smtp random for example, where collect, filter, updateDB and generateReports are all PHP scripts which acccept command line parameters as well as use stdin to read data in realtime. Just like | more would. Richard. [1] http://pear.php.net/package/Console_CommandLine [2] http://docs.php.net/manual/en/install.windows.commandline.php [3] http://adoxa.110mb.com/ansicon/index.html [4] http://pecl.php.net/package/win32service [5] http://pecl.php.net/package/wincache VD3 : Source code synchronisation. View and synchronize source code modules. Usage: VD3 [options] VD3
Re: [PHP] Command line PHP
On 11-01-11 11:27 AM, Richard Quadling wrote: As PHP on windows requires an [ENTER] key to be pressed to pass the typed string to the code (even for fgetc(STDIN) ), then this may not be what you want. Have you tried setting the stream to non-blocking to prevent the need for the return key? Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
On 11 January 2011 16:43, Robert Cummings rob...@interjinn.com wrote: On 11-01-11 11:27 AM, Richard Quadling wrote: As PHP on windows requires an [ENTER] key to be pressed to pass the typed string to the code (even for fgetc(STDIN) ), then this may not be what you want. Have you tried setting the stream to non-blocking to prevent the need for the return key? Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. PHP on windows doesn't support non-blocking streams. It's not so much PHP's fault, but the underlying code from MS that PHP uses (AFAICT). Setting a stream to non blocking and then immediately asking if it is blocking shows that it is still blocking. http://bugs.php.net/bug.php?id=34972 is the best example of this issue. Especially the last comment ... what makes you think that anything has been done about this feature request?. I'm not holding my breath for a fix. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
On 11 January 2011 16:43, Robert Cummings rob...@interjinn.com wrote: On 11-01-11 11:27 AM, Richard Quadling wrote: As PHP on windows requires an [ENTER] key to be pressed to pass the typed string to the code (even for fgetc(STDIN) ), then this may not be what you want. Have you tried setting the stream to non-blocking to prevent the need for the return key? Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. And this was my bug report [1] nearly 2 years ago on this. Richard. [1] http://bugs.php.net/bug.php?id=47918 -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
On 11-01-11 11:55 AM, Richard Quadling wrote: On 11 January 2011 16:43, Robert Cummingsrob...@interjinn.com wrote: On 11-01-11 11:27 AM, Richard Quadling wrote: As PHP on windows requires an [ENTER] key to be pressed to pass the typed string to the code (even for fgetc(STDIN) ), then this may not be what you want. Have you tried setting the stream to non-blocking to prevent the need for the return key? Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. PHP on windows doesn't support non-blocking streams. It's not so much PHP's fault, but the underlying code from MS that PHP uses (AFAICT). Setting a stream to non blocking and then immediately asking if it is blocking shows that it is still blocking. http://bugs.php.net/bug.php?id=34972 is the best example of this issue. Especially the last comment ... what makes you think that anything has been done about this feature request?. I'm not holding my breath for a fix. Doh, that sucks! Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: Help: Validate Domain Name by Regular Express
Hello Per Jessen, Am 2011-01-11 11:54:53, hacktest Du folgendes herunter: Only for characters that are not part of a national alphabet, I believe? This one works fine: http://rugbrød.ch/ http://ätsch.de/ works too Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
At 11:54 AM +0100 1/11/11, Per Jessen wrote: tedd wrote: At that time, I registered almost 30 names. Fortunately, all of my names passed and I was permitted to keep them. Unfortunately, all browser manufactures (except Safari) negated some of the work done by the IDNS WG and as a result PUNYCODE is shown instead of the actual characters intended. Only for characters that are not part of a national alphabet, I believe? This one works fine: http://rugbrød.ch/ Not for me. It translates to: xn--rugbrd-fya.ch Besides, many domain registrars also limit the available characters to those that are part of a national alphabet. -- Per Jessen, Zürich (0.0°C) National alphabet? Never heard of it -- what Nation? Are the Greek letters Sigma, Delta, Pi part of this National alphabet? While they are common in our English language, I don't think they are not included. In addition, many registrars are clueless about IDNS, Char Sets, and what is legal and not. Plus, the are many differences between different TLD registrars. For example, the TLD COM can have single characters whereas the ORG will not allow single characters regardless of language (including ASCII). The IDNS is still in a state of flux. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
tedd wrote: At 1:54 PM -0500 1/7/11, Joshua Kehn wrote: Why should someone stop learning ever? Because my head fills up. I have to wait until I forget something before I can learn something new. The up-side is that I'm learning something new almost every day now. Cheers, tedd lol.. I just play too many video games.. it frees up all sorts of space. ;-) Donovan -- D Brooke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP job
On Tue, Jan 11, 2011 at 4:19 AM, Jay Blanchard jblanch...@pocket.comwrote: I am always looking for the $needle in the $haystack. Just sayin' I often find it faster to hire a bunch of horses to eat the $haystack, leaving the $needle behind and easy to find. David
[PHP] Re: Craigslist Jobs
Ethan Rosenberg wrote: Dear List - I am a NEWBIE, so . How do I handle Craigslist postings? Is there anything special I should do? Any advice for other web sites? At this point I am talking about small jobs. 1] My payment. Should I ask for something up front? If so how much? depends on the amount, how comfortable you are, and how comfortable they are, escrow is safer for larger amounts. 2] How do I protect myself so that I do not deliver code and not get paid. pretty much the same way you protect yourself from not getting run over or robbed. 3] What is a reasonable hourly rate? multiple factors here, a good starting point is to figure out how much you need to make an hour, add 20-40% on, then figure out how many hours it'll take you, multiply it all up and add on another 20-40% All this depends on your skill level, if you can do the job, if the customer has the budget and so forth - just agree something you're both comfortable with. 4] Any other information that I should know? Yes, you will get burned a few times, and have both good and bad experiences when you least expect them - the main thing is just to remember the clients are people, with a problem to solve, you're there to solve that problem in a cost effective manner, and ultimately your work has two values, the first is what you require to put food on the table, and the second is what the project is worth to the the client. If you land anywhere between the two of those, then you're doing well :) Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] First PHP job
[snip] I often find it faster to hire a bunch of horses to eat the $haystack, leaving the $needle behind and easy to find. [/snip] Even cheaper to just burn the hay. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
On 11-01-11 12:14 PM, Donovan Brooke wrote: tedd wrote: At 1:54 PM -0500 1/7/11, Joshua Kehn wrote: Why should someone stop learning ever? Because my head fills up. I have to wait until I forget something before I can learn something new. The up-side is that I'm learning something new almost every day now. Cheers, tedd lol.. I just play too many video games.. it frees up all sorts of space. ;-) Does anyone remember the episode of Married With Children where they discover that they can feed facts into Kelly's brain but there's a limit after which if something goes in something comes out? Then there's the big tv trivia challenge at the end and she's stuffed full. The host tells her something and you hear a *bing* that something has gone out... which happens to be the answer to the final question :) After remembering this, it's obvious I've got some junk banging around up top that doesn't need keeping :) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP job
On 11-01-11 12:15 PM, David Harkness wrote: On Tue, Jan 11, 2011 at 4:19 AM, Jay Blanchardjblanch...@pocket.comwrote: I am always looking for the $needle in the $haystack. Just sayin' I often find it faster to hire a bunch of horses to eat the $haystack, leaving the $needle behind and easy to find. My horse now has a perforated stomach and colon. Can I send you the veterinarian's bill? ;) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Craigslist Jobs
Quote:Yes, you will get burned a few times, and have both good and bad experiences when you least expect them - the main thing is just to remember the clients are people, with a problem to solve, you're there to solve that problem in a cost effective manner, and ultimately your work has two values, the first is what you require to put food on the table, and the second is what the project is worth to the the client. If you land anywhere between the two of those, then you're doing well :) That is awesome advice for any employee in any field, anywhere. :) On Tue, Jan 11, 2011 at 12:27 PM, Nathan Rixham nrix...@gmail.com wrote: Ethan Rosenberg wrote: Dear List - I am a NEWBIE, so . How do I handle Craigslist postings? Is there anything special I should do? Any advice for other web sites? At this point I am talking about small jobs. 1] My payment. Should I ask for something up front? If so how much? depends on the amount, how comfortable you are, and how comfortable they are, escrow is safer for larger amounts. 2] How do I protect myself so that I do not deliver code and not get paid. pretty much the same way you protect yourself from not getting run over or robbed. 3] What is a reasonable hourly rate? multiple factors here, a good starting point is to figure out how much you need to make an hour, add 20-40% on, then figure out how many hours it'll take you, multiply it all up and add on another 20-40% All this depends on your skill level, if you can do the job, if the customer has the budget and so forth - just agree something you're both comfortable with. 4] Any other information that I should know? Yes, you will get burned a few times, and have both good and bad experiences when you least expect them - the main thing is just to remember the clients are people, with a problem to solve, you're there to solve that problem in a cost effective manner, and ultimately your work has two values, the first is what you require to put food on the table, and the second is what the project is worth to the the client. If you land anywhere between the two of those, then you're doing well :) Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP job
It must be a big joke!!! -- João Cândido de Souza Neto Robert Cummings rob...@interjinn.com escreveu na mensagem news:4d2c997d.3010...@interjinn.com... On 11-01-11 12:15 PM, David Harkness wrote: On Tue, Jan 11, 2011 at 4:19 AM, Jay Blanchardjblanch...@pocket.comwrote: I am always looking for the $needle in the $haystack. Just sayin' I often find it faster to hire a bunch of horses to eat the $haystack, leaving the $needle behind and easy to find. My horse now has a perforated stomach and colon. Can I send you the veterinarian's bill? ;) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
At 11:14 AM -0600 1/11/11, Donovan Brooke wrote: tedd wrote: At 1:54 PM -0500 1/7/11, Joshua Kehn wrote: Why should someone stop learning ever? Because my head fills up. I have to wait until I forget something before I can learn something new. The up-side is that I'm learning something new almost every day now. Cheers, tedd lol.. I just play too many video games.. it frees up all sorts of space. ;-) Donovan My down time is playing XBOX Black Ops. It allows my mind to focus on things that don't matter, much like a vacation, that's frees space My gamer tag is special tedd -- for which many will understand. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
On 11 January 2011 17:53, Robert Cummings rob...@interjinn.com wrote: On 11-01-11 12:14 PM, Donovan Brooke wrote: tedd wrote: At 1:54 PM -0500 1/7/11, Joshua Kehn wrote: Why should someone stop learning ever? Because my head fills up. I have to wait until I forget something before I can learn something new. The up-side is that I'm learning something new almost every day now. Cheers, tedd lol.. I just play too many video games.. it frees up all sorts of space. ;-) Does anyone remember the episode of Married With Children where they discover that they can feed facts into Kelly's brain but there's a limit after which if something goes in something comes out? Then there's the big tv trivia challenge at the end and she's stuffed full. The host tells her something and you hear a *bing* that something has gone out... which happens to be the answer to the final question :) After remembering this, it's obvious I've got some junk banging around up top that doesn't need keeping :) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php For some unknown reason, my pc just went bing bong. I'm guessing it has forgotten (deleted) something useful for me. Thanks! -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP job
At 4:12 PM -0200 1/11/11, Joo Cndido de Souza Neto wrote: It must be a big joke!!! No really, his horse has serious problems. It's not good to find needles that way. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] First PHP job
On 11-01-11 01:15 PM, tedd wrote: At 4:12 PM -0200 1/11/11, Jo“o C’ndido de Souza Neto wrote: It must be a big joke!!! No really, his horse has serious problems. It's not good to find needles that way. I've nicknamed him Porcuphiney. Cheers, Rob. Ps. for those with limited english comprehension... porcupine-hiney -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
tedd wrote: At 11:54 AM +0100 1/11/11, Per Jessen wrote: tedd wrote: At that time, I registered almost 30 names. Fortunately, all of my names passed and I was permitted to keep them. Unfortunately, all browser manufactures (except Safari) negated some of the work done by the IDNS WG and as a result PUNYCODE is shown instead of the actual characters intended. Only for characters that are not part of a national alphabet, I believe? This one works fine: http://rugbrød.ch/ Not for me. It translates to: xn--rugbrd-fya.ch Probably a browser issue. The above works fine with e.g. FF3.6 amd Konqueror 3.5. Besides, many domain registrars also limit the available characters to those that are part of a national alphabet. National alphabet? Never heard of it -- what Nation? Perhaps not the correct expression, but most non-English languages have their own alphabets, and despite some countries sharing a language, what they allow for domain name registration isn't always the same (ref. Michelle Konzacks earlier posting). For instance, while 'ï' is used in Dutch, English, and French (I believe), it is not used in Danish, so it is not allowed in Danish domain names. Here is the list of characters accepted by the German registrar: http://www.denic.de/de/domains/internationalized-domain-names/idn-liste.html The Swiss registrar: https://www.nic.ch/reg/wcmPage.action?res=/reg/guest/faqs/idn.jspplainlid=de Austrian registrar: http://www.nic.at/fileadmin/www.nic.at/documents/idn/idn_at_tld_de.txt Danish registrar: https://www.dk-hostmaster.dk/selvbetjening/koeb-dk-domaenenavn/tegnsaet-for-domaenenavne/ (quite limited: a-z, 0-9, hyphen, æ, ø, å, ö, ä, ü, é) Are the Greek letters Sigma, Delta, Pi part of this National alphabet? No, only the Greek alphabet which probably is used in Greece and Cyprus only. In addition, many registrars are clueless about IDNS, Char Sets, and what is legal and not. Not in my experience. The various national/European registrars usually have very strict regulations, and any domain registrar offering his or her services to the public had better understand them. -- Per Jessen, Zürich (0.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
Michelle Konzack wrote: Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Here is a list of 197 such Swiss domains: http://public.jessen.ch/files/ch-domains-only-numeric.txt -- Per Jessen, Zürich (0.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stripping carriage returns
I'm retrieving CLOB data from an Oracle database, and cleaning up the HTML in it. I'm using the following commands: $content = strip_tags($description-fields['CONTENT'],'polulli'); $content = preg_replace(/p.*/,p,$content); The second line is necessary because the p tag frequently comes with class or style descriptions that must be eliminated. This works on the whole except where the p tag with the style definition is broken up over two or more lines. In other words, something like: p class = bullettext style = line-height: normal border: 3; In this case, the second line of my code does not strip the class or style definitions from the paragraph tag. I've tried: $content = nl2br($content) and $content = str_replace(chr(13),$content) and $content = preg_replace(/[.chr(10).|.chr(13).]/,,$content) (I've read that Oracle uses chr(10) or chr(13) to represent line breaks internally, so I decided to give those a try as well.) and $content = str_replace(array('\n','\r','\r\n'),$content) all to no avail; these all leave the line break intact, which means my preg_replace('/p.*/','p',$content) line still breaks. Anyone have any ideas? -- Sláinte, Richard S. Crawford (rich...@underpope.com) http://www.underpope.com
Re: [PHP] Command line PHP
On Tue, Jan 11, 2011 at 10:12 AM, tedd tedd.sperl...@gmail.com wrote: My down time is playing XBOX Black Ops. It allows my mind to focus on things that don't matter, much like a vacation, that's frees space For me that's Left 4 Dead 2 as Captain Cujo. I think it's beneficial to cultivate skills in something that totally doesn't matter. Of course, in the event of an *actual* zombie apocalypse I'll be well prepared. :) David
Re: [PHP] Stripping carriage returns
On Tue, 2011-01-11 at 11:13 -0800, Richard S. Crawford wrote: I'm retrieving CLOB data from an Oracle database, and cleaning up the HTML in it. I'm using the following commands: $content = strip_tags($description-fields['CONTENT'],'polulli'); $content = preg_replace(/p.*/,p,$content); The second line is necessary because the p tag frequently comes with class or style descriptions that must be eliminated. This works on the whole except where the p tag with the style definition is broken up over two or more lines. In other words, something like: p class = bullettext style = line-height: normal border: 3; In this case, the second line of my code does not strip the class or style definitions from the paragraph tag. I've tried: $content = nl2br($content) and $content = str_replace(chr(13),$content) and $content = preg_replace(/[.chr(10).|.chr(13).]/,,$content) (I've read that Oracle uses chr(10) or chr(13) to represent line breaks internally, so I decided to give those a try as well.) and $content = str_replace(array('\n','\r','\r\n'),$content) all to no avail; these all leave the line break intact, which means my preg_replace('/p.*/','p',$content) line still breaks. Anyone have any ideas? If you don't have too many problems with the HTML code (like broken tags, etc) then maybe you could use strip_tags() which will perform better than a regex in this instance, and should work with tags over multiple lines as well (although I can't say I've specifically tried that) Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] First PHP job
On Tue, Jan 11, 2011 at 9:55 AM, Robert Cummings rob...@interjinn.comwrote: My horse now has a perforated stomach and colon. Can I send you the veterinarian's bill? Who knew they made carrot-flavored $needles? David
[PHP] Re: Stripping carriage returns
What about trying str_replace(PHP_EOL, , $content); -- João Cândido de Souza Neto Richard S. Crawford rich...@underpope.com escreveu na mensagem news:aanlktimzfk+ku6dkvjmhekbsycuosn2tv+0txfsn9...@mail.gmail.com... I'm retrieving CLOB data from an Oracle database, and cleaning up the HTML in it. I'm using the following commands: $content = strip_tags($description-fields['CONTENT'],'polulli'); $content = preg_replace(/p.*/,p,$content); The second line is necessary because the p tag frequently comes with class or style descriptions that must be eliminated. This works on the whole except where the p tag with the style definition is broken up over two or more lines. In other words, something like: p class = bullettext style = line-height: normal border: 3; In this case, the second line of my code does not strip the class or style definitions from the paragraph tag. I've tried: $content = nl2br($content) and $content = str_replace(chr(13),$content) and $content = preg_replace(/[.chr(10).|.chr(13).]/,,$content) (I've read that Oracle uses chr(10) or chr(13) to represent line breaks internally, so I decided to give those a try as well.) and $content = str_replace(array('\n','\r','\r\n'),$content) all to no avail; these all leave the line break intact, which means my preg_replace('/p.*/','p',$content) line still breaks. Anyone have any ideas? -- Sláinte, Richard S. Crawford (rich...@underpope.com) http://www.underpope.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stripping carriage returns
On Tue, Jan 11, 2011 at 14:13, Richard S. Crawford rich...@underpope.com wrote: $content = str_replace(chr(13),$content) and $content = str_replace(array('\n','\r','\r\n'),$content) Neither of these have replacement values, which might just be a typo. However, the larger issue is in the single (literal) quotes in the second example. Change that to: $content = str_replace(array(\n,\r,\r\n),'',$content); If you're ambitious, you can try the FileConv PHP extension available here: http://links.parasane.net/dxdv -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stripping carriage returns
On Tue, Jan 11, 2011 at 11:13 AM, Richard S. Crawford rich...@underpope.com wrote: $content = preg_replace(/[.chr(10).|.chr(13).]/,,$content) This should be $content = preg_replace('/[\r\n]/','',$content) First, you can embed \r and \n directly in the regular expression as-is (not converted to chr(10) by PHP) by using single quotes. Second, you don't want the vertical bar inside []. That's only for (). David
Re: [PHP] Stripping carriage returns
Strangely, when I use \n, or nl2br(), or PHP_EOL, or anything like that, it strips out not just line breaks, but most of the rest of the text as well. I suspect an encoding issue at this point. Daniel, you were right when you said that neither of my str_replace lines had repl.acement values; that was indeed a typo when I was copying the code over into my email. Ashley, I've already been using strip_tags to eliminate all but p, ol, ul, and li tags. On Tue, Jan 11, 2011 at 11:24 AM, David Harkness davi...@highgearmedia.comwrote: On Tue, Jan 11, 2011 at 11:13 AM, Richard S. Crawford rich...@underpope.com wrote: $content = preg_replace(/[.chr(10).|.chr(13).]/,,$content) This should be $content = preg_replace('/[\r\n]/','',$content) First, you can embed \r and \n directly in the regular expression as-is (not converted to chr(10) by PHP) by using single quotes. Second, you don't want the vertical bar inside []. That's only for (). David -- Sláinte, Richard S. Crawford (rich...@underpope.com) http://www.underpope.com
Re: [PHP] Stripping carriage returns
On Jan 11, 2011, at 11:34 AM, Richard S. Crawford wrote: Strangely, when I use \n, or nl2br(), or PHP_EOL, or anything like that, it strips out not just line breaks, but most of the rest of the text as well. I suspect an encoding issue at this point. Daniel, you were right when you said that neither of my str_replace lines had repl.acement values; that was indeed a typo when I was copying the code over into my email. Ashley, I've already been using strip_tags to eliminate all but p, ol, ul, and li tags. Perhaps you could use tidy to clean up the formatting (use -wrap 0) before attempting to strip out the stuff you want to get rid of. Mari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Tue, 2011-01-11 at 19:00 +, Ashley Sheridan wrote: On Tue, 2011-01-11 at 17:07 +0100, Michelle Konzack wrote: Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Like 163.com or 126.net which are legal names. Oh I should mention that I block ANY mails from this two domains since chinese spamers use it excessively. Thanks, Greetings and nice Day/Evening Michelle Konzack I just based the code on the spec. Thanks, Ash http://www.ashleysheridan.co.uk my old (still kinda active but not really) business was/is called 990WEBS, and my URL is www.990webs.ca / www.990webs.com is the url with preceeding numerals an issue? or is this only numerals only? it also is my business number :P 990-9327 (WEBS) TheStapler.ca is also my domain... which is a my nickname (last name is staples) ANYWAY... way off topic there, was just wodnering about the legality of my 990webs domains... since i can't think of any other domains that start with numbers off the top of my head? -- Steve Staples Web Application Developer 519.258.2333 x8414 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help: Validate Domain Name by Regular Express
On Tue, 2011-01-11 at 14:44 -0500, Steve Staples wrote: On Tue, 2011-01-11 at 19:00 +, Ashley Sheridan wrote: On Tue, 2011-01-11 at 17:07 +0100, Michelle Konzack wrote: Hello Ashley Sheridan, Am 2011-01-08 17:09:27, hacktest Du folgendes herunter: Also, each label is checked to ensure it doesn't run over 63 characters, and the whole thing isn't over 253 characters. Lastly, each label is checked to ensure it doesn't completely consist of digits. Do you know, that there are MANY domains with numbers only? Like 163.com or 126.net which are legal names. Oh I should mention that I block ANY mails from this two domains since chinese spamers use it excessively. Thanks, Greetings and nice Day/Evening Michelle Konzack I just based the code on the spec. Thanks, Ash http://www.ashleysheridan.co.uk my old (still kinda active but not really) business was/is called 990WEBS, and my URL is www.990webs.ca / www.990webs.com is the url with preceeding numerals an issue? or is this only numerals only? it also is my business number :P 990-9327 (WEBS) TheStapler.ca is also my domain... which is a my nickname (last name is staples) ANYWAY... way off topic there, was just wodnering about the legality of my 990webs domains... since i can't think of any other domains that start with numbers off the top of my head? -- Steve Staples Web Application Developer 519.258.2333 x8414 Ah, it was my mistake, I misread the spec. It's only the TLD that must not be completely numeric, so that check can be taken out of the code I gave earlier. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Server Response
Newsgroup server response is terrible and has a strange behavior. Response for first posting or two is fast, then it acts like it doesn't want to give me any additional postings. You fixed it about about 2 or 3 weeks ago; but issue has returned, Al.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Craigslist Jobs
join oDesk. They have a lot of programming jobs on there, it is also pretty secure. On Tue, Jan 11, 2011 at 12:57 PM, Matty Sarro msa...@gmail.com wrote: Quote:Yes, you will get burned a few times, and have both good and bad experiences when you least expect them - the main thing is just to remember the clients are people, with a problem to solve, you're there to solve that problem in a cost effective manner, and ultimately your work has two values, the first is what you require to put food on the table, and the second is what the project is worth to the the client. If you land anywhere between the two of those, then you're doing well :) That is awesome advice for any employee in any field, anywhere. :) On Tue, Jan 11, 2011 at 12:27 PM, Nathan Rixham nrix...@gmail.com wrote: Ethan Rosenberg wrote: Dear List - I am a NEWBIE, so . How do I handle Craigslist postings? Is there anything special I should do? Any advice for other web sites? At this point I am talking about small jobs. 1] My payment. Should I ask for something up front? If so how much? depends on the amount, how comfortable you are, and how comfortable they are, escrow is safer for larger amounts. 2] How do I protect myself so that I do not deliver code and not get paid. pretty much the same way you protect yourself from not getting run over or robbed. 3] What is a reasonable hourly rate? multiple factors here, a good starting point is to figure out how much you need to make an hour, add 20-40% on, then figure out how many hours it'll take you, multiply it all up and add on another 20-40% All this depends on your skill level, if you can do the job, if the customer has the budget and so forth - just agree something you're both comfortable with. 4] Any other information that I should know? Yes, you will get burned a few times, and have both good and bad experiences when you least expect them - the main thing is just to remember the clients are people, with a problem to solve, you're there to solve that problem in a cost effective manner, and ultimately your work has two values, the first is what you require to put food on the table, and the second is what the project is worth to the the client. If you land anywhere between the two of those, then you're doing well :) Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Mujtaba
Re: [PHP] Stripping carriage returns
On 1/11/2011 11:13 AM, Richard S. Crawford wrote: I'm retrieving CLOB data from an Oracle database, and cleaning up the HTML in it. I'm using the following commands: $content = strip_tags($description-fields['CONTENT'],'polulli'); $content = preg_replace(/p.*/,p,$content); The second line is necessary because the p tag frequently comes with class or style descriptions that must be eliminated. This works on the whole except where the p tag with the style definition is broken up over two or more lines. In other words, something like: p class = bullettext style = line-height: normal border: 3; In this case, the second line of my code does not strip the class or style definitions from the paragraph tag. I've tried: $content = nl2br($content) and $content = str_replace(chr(13),$content) and $content = preg_replace(/[.chr(10).|.chr(13).]/,,$content) (I've read that Oracle uses chr(10) or chr(13) to represent line breaks internally, so I decided to give those a try as well.) and $content = str_replace(array('\n','\r','\r\n'),$content) all to no avail; these all leave the line break intact, which means my preg_replace('/p.*/','p',$content) line still breaks. Anyone have any ideas? Richard, Looks like you need to read up on the modifiers for preg_* functions. Start here: http://us3.php.net/manual/en/reference.pcre.pattern.modifiers.php I would change your second line regex to the following. $content = preg_replace(/p.*/is, p, $content); The modifiers after the second / are i = case-insensitive s = include new lines in your '.' character match. New lines are excluded by default. Can't remember right now, nor do I have the time to test, you might need to invert the greediness of the match using a 'U' after the second / also. So... $content = preg_replace(/p.*/isU, p, $content); YMMV Let us know how this works out for you. Jim Lucas PS: you might want to swap the order of these two statements. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML errors
Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters …omehome/a/lilia href=index.php?page=servicesservices/a/lilia h… I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- Blessings David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
Hi David: Quote your attribute value in ... On Wed, Jan 12, 2011 at 2:35 PM, David McGlone da...@dmcentral.net wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters …omehome/a/lilia href=index.php?page=servicesservices/a/lilia h… I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- Blessings David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Regards, CHEN Dong
[PHP] Re: HTML errors
David McGlone wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters ?omehome/a/lilia href=index.php?page=servicesservices/a/lilia h? I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. In this tag you aren't getting the href value enclosed in quotes which I suspect would trigger the validator error. a href=index.php?page=services Cheers -- David Robley I'll take that, said Tom appropriately. Today is Boomtime, the 12nd day of Chaos in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On Tue, Jan 11, 2011 at 22:35, David McGlone da...@dmcentral.net wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters This is because you misspelled $categorys, where it should actually be $categories. In some of the most recent updates to the core, primarily by Felipe Pena, PHP will now, by default, kick out errors in validation due to misspellings and incorrect grammar. To override this, you must uncomment the following line in your system's php.ini: ;human = true This will allow the parser to understand that you're human, thus capable of mistakes. Please keep in mind, however, that it's only able to be set in php.ini. This is to keep bots and the like from hijacking shared hosts, where an INI_PERDIR setting could potentially be written to the local account by exploitation of a variety of means (including, but not limited to, XSS, file inclusion, and SQL injection techniques). While it may seem a bit of a hassle to need to take this extra step, we all agree that Felipe has done this with the best interests of the community at heart. Having seen the substitutions of 'r' for 'are' and 'u' for 'you' (among many others), he has single-handedly taken it upon himself to use PHP not only as a tool to assist in technological projects, but as a means to teach proper spelling, grammar, and even punctuation to the world (in PHP 7, semicolons will be replaced by commas, periods, and question marks, as appropriate). To learn more about his efforts, go to http://ca2.php.net/spelling-enforcement.php -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On 1/11/2011 7:35 PM, David McGlone wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; Try this instead echo 'lia href=index.php?page=',$category,'',$replace,'/a/li'; Jim Lucas } Validator Error: an attribute value must be a literal unless it contains only name characters …omehome/a/lilia href=index.php?page=servicesservices/a/lilia h… I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php