[PHP] DOMDocument getElementsByAttribute ??

2009-03-09 Thread Michael A. Peters
Seems like such a function does not exist in php. I can write my own function that does it using DOMElement->hasAttribute() - but I'm not sure how to get an array of every element in the DOM to test them for the attribute. Any hints? I'm sure it's simple, I'm just

[PHP] Re: DOMDocument getElementsByAttribute ??

2009-03-09 Thread Michael A. Peters
Nathan Rixham wrote: Michael A. Peters wrote: Seems like such a function does not exist in php. I can write my own function that does it using DOMElement->hasAttribute() - but I'm not sure how to get an array of every element in the DOM to test them for the attribute. Any hints?

[PHP] Re: DOMDocument getElementsByAttribute ??

2009-03-09 Thread Michael A. Peters
Nathan Rixham wrote: Michael A. Peters wrote: Nathan Rixham wrote: Michael A. Peters wrote: Seems like such a function does not exist in php. I can write my own function that does it using DOMElement->hasAttribute() - but I'm not sure how to get an array of every element in the DOM

Re: [PHP] Cookies/Sessions and how they work

2009-03-10 Thread Michael A. Peters
Paul M Foster wrote: This is in two parts. First cookies. I'm a little unclear on how they work. From what I've read, cookies are stored by the browser. When a request for that cookie comes in from the server, the browser returns only the value, and no other data. One question: When t

Re: [PHP] Re: PHP includes

2009-03-10 Thread Michael A. Peters
self up to possible hacks where people put the URL of your include directly in their browser and view all your code. Easily solveable by keeping your include files in a directory outside the web root. IE in a directory apache (or whatever server you use) does not serve. If you have any include files

Re: [PHP] soft Phone

2009-03-10 Thread Michael A. Peters
shahrzad khorrami wrote: Hi all :-) I want to use of *soft phone* application in my php codes..First is it possible? has php a module for this purpose? if it hasn't... By the way I think I must use of something else such as a java application in my php codes... now how can I embed

Re: [PHP] whoami explanation

2009-03-10 Thread Michael A. Peters
Daniel Brown wrote: On Tue, Mar 10, 2009 at 15:31, 9el wrote: I'm trying to find whoami here :D You mean to say: "I'm trying to find whyami here." I think I am here therefore I why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

Re: [PHP] Include File Errors with Comments

2009-03-10 Thread Michael A. Peters
Patrick Moloney wrote: Does PHP preprocess the file but treat the comments as text because I never said it was HTML? I've not had it do that. Would PHP comments have to be inside PHP tags? Yes. If you use a php comment it has to be inside a php tag. One issue I have seen though i

Re: [PHP] This code using _GET exploitable

2009-03-11 Thread Michael A. Peters
filtered wrote: Hi, we have script containing and http://example.com""; />'; } ?> Is this code prone to XSS attacks or for attacking the local webserver and if so, how? $cam isn't used anywhere else. -a It certainly is XSS vulnerable throu

Re: [PHP] This code using _GET exploitable

2009-03-11 Thread Michael A. Peters
filtered wrote: Hi, we have script containing http://www.yourwebsite.org/yourpage.php?studio=alert('xss'); and http://example.com""; />'; } ?> That I don't think is exploitable since you are not doing anything with cam directly b

Re: [PHP] This code using _GET exploitable

2009-03-11 Thread Michael A. Peters
ace domain and script name to match your site/script) Ok, but I don't see how this code could be used to attack the local php/web-server reflected attack. Someone puts that as the image source on some website they trick a legitimate user in going to (IE - click here to see latest b

[PHP] DOM - change a tag name ??

2009-03-11 Thread Michael A. Peters
If I'm manipulating a dom object, is there a way to change the tag name? I know you manipulate just about everything else in a node - but is the tagName really off limits? from the documentation for DOMElement - /* Properties */ readonly public bool $schemaTypeInfo ; readonly public s

Re: [PHP] DOM - change a tag name ??

2009-03-11 Thread Michael A. Peters
Michael A. Peters wrote: If I'm manipulating a dom object, is there a way to change the tag name? I know you manipulate just about everything else in a node - but is the tagName really off limits? from the documentation for DOMElement - /* Properties */ readonly public bool $schemaTyp

Re: [PHP] DOM - change a tag name ??

2009-03-11 Thread Michael A. Peters
Andrew Ballard wrote: On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters wrote: If I'm manipulating a dom object, is there a way to change the tag name? I know you manipulate just about everything else in a node - but is the tagName really off limits? from the documentation for DOMEl

Re: [PHP] DOM - change a tag name ??

2009-03-11 Thread Michael A. Peters
Andrew Ballard wrote: On Wed, Mar 11, 2009 at 3:06 PM, Michael A. Peters wrote: Andrew Ballard wrote: On Wed, Mar 11, 2009 at 11:52 AM, Michael A. Peters wrote: If I'm manipulating a dom object, is there a way to change the tag name? I know you manipulate just about everything else

Re: [PHP] validation & inserts not working

2009-03-11 Thread Michael A. Peters
1 = mysql_query($sql1, $db); $autoid = mysql_insert_id(); echo $autoid; works... but now, I have another problem... I am trying to debug this thing by going 1 query at a time ( I comment out the rest): every time I do an INSERT INTO book... the insert works fine but the ID is increased not from

Re: [PHP] Re: PHP/Apache: script unexpectedly invoked multiple times in parallel every 30 secs.

2009-03-11 Thread Michael A. Peters
at all, while the logs report the script is running several times in parallel and the network monitor reports a single browser request. I could not find in the docs any server configuration parameter which would re-invoke a script without killing its currently running instance. are you

[PHP] The PHP filter class I'm working on (securiity)

2009-03-13 Thread Michael A. Peters
I would appreciate feedback. First php class I've written myself (the little tiny ones that are just over-glorified functions don't count.) Probably has bugs. I have not thoroughly tested it - but I finally have a nice test sandbox to play with. http://www.clfsr

Re: [PHP] The PHP filter class I'm working on (securiity)

2009-03-13 Thread Michael A. Peters
Michael A. Peters wrote: I would appreciate feedback. First php class I've written myself (the little tiny ones that are just over-glorified functions don't count.) Probably has bugs. iframes and objects aren't working even for white listed where they should - I know why o

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Michael A. Peters
Martin Zvarík wrote: What's the point? The point is detailed on the (not fully complete) description page I just put up - http://www.clfsrpm.net/xss/ Namely, a lot of people who have web sites do not have the technical capability to prevent their site from being used as an XSS vect

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-18 Thread Michael A. Peters
Martin Zvarík wrote: Jan G.B. napsal(a): 2009/3/15 Martin Zvarík : "The browser will only execute script in source files from the white-listed domains and will disregard everything else, including embedded and inline scripts. " wtf, can't you just take care of the INPUT and

Re: [PHP] Smarty Tips and Techniques

2009-03-19 Thread Michael A. Peters
tackling only things you can grasp. To be honest - one of the problems is that documentation that tries to explain these concepts is often severely lacking, using extremely poor analogies, and only make sense to people who already have an understanding of the concept. For example - A car is a

Re: [PHP] Smarty Tips and Techniques

2009-03-19 Thread Michael A. Peters
Robert Cummings wrote: On Thu, 2009-03-19 at 16:27 -0700, Michael A. Peters wrote: Marc Christopher Hall wrote: The following comment is not intended to be helpful *smacks head on desk repeatedly...* This comment is.. I would hazard to say that if you are unwilling or unable to grasp

Re: [PHP] Smarty Tips and Techniques

2009-03-19 Thread Michael A. Peters
Robert Cummings wrote: On Thu, 2009-03-19 at 18:05 -0700, Michael A. Peters wrote: Robert Cummings wrote: On Thu, 2009-03-19 at 16:27 -0700, Michael A. Peters wrote: Marc Christopher Hall wrote: The following comment is not intended to be helpful *smacks head on desk repeatedly

Re: [PHP] Smarty Tips and Techniques

2009-03-19 Thread Michael A. Peters
Bob McConnell wrote: But defining objects and then figuring out how to create and use them completely escapes me. My mind simply won't map a problem into objects, it only sees procedures. Even when I look at classes, they resolve only as loose groupings of functions and variables, n

Re: [PHP] Looking for PHP alternatives to mailman

2009-03-20 Thread Michael A. Peters
mike wrote: On Fri, Mar 20, 2009 at 12:35 AM, mike wrote: On Thu, Mar 19, 2009 at 11:34 PM, Per Jessen wrote: ecartis is one option. now this is a good lead! except not touched since 2003 it seems. sigh. well there was some updates in 2006, .. this whole site is outdated and riddled

Re: [PHP] PHP blogs?

2009-03-20 Thread Michael A. Peters
Stuart wrote: 2009/3/20 George Larson : I'm reorganizing my reader. Anybody suggest any good PHP feeds? http://www.planet-php.net/ is an aggregator of some of the good stuff that's out there. It displays horribly in Firefox. They need to fix it. -- PHP General Mailing List (http://www.php.

Re: [PHP] Importing Data with Field Names

2009-03-20 Thread Michael A. Peters
revDAVE wrote: Newbie... I have phpmyadmin... I'm basically looking for a quick way to import records and avoid hand- typing many field names (I can set the field types later) Is there a way to import into mySql with let's say a csv file - (or Tab delimited file) and have the fi

Re: [PHP] PHP blogs?

2009-03-20 Thread Michael A. Peters
Luke wrote: Yeah the CSS doesn't seem to be restricting the width of the boxes properly The problem is the tag in the one blog. Maybe there's a way, but the code tag doesn't like forced formating, so they need to replace code nodes with a div node that has style to emulat

[PHP] DOMElement - attributes and namespace

2009-03-22 Thread Michael A. Peters
e tested though, may require different handling?? // I should get a MathML document and try it out. $pattern = '/[^a-z0-9:-]+/i'; $clean = strtolower(preg_replace($pattern,'',$attribute->name)); if (strcmp($clean,$attribute->name) != 0)

Re: [PHP] DOMElement - attributes and namespace

2009-03-22 Thread Michael A. Peters
Michael A. Peters wrote: Here's the problem - $attributes = $node->attributes; creates a list that has both regular attributes and namespaced attributes. But I don't know how to programatically tell them apart. http://phpbuilder.com/manual/en/class.domattr.php What would b

Re: [PHP] DOMElement - attributes and namespace

2009-03-22 Thread Michael A. Peters
Michael A. Peters wrote: Michael A. Peters wrote: Here's the problem - $attributes = $node->attributes; creates a list that has both regular attributes and namespaced attributes. But I don't know how to programatically tell them apart. http://phpbuilder.com/manual/en/clas

Re: [PHP] DOMElement - attributes and namespace

2009-03-22 Thread Michael A. Peters
Michael A. Peters wrote: At some point I'll get the guts to report it as a bug just to be told it isn't a bug with the standard response that says it isn't a bug and absolutely no explanation as to why. Bug ID 47747 Clear demonstration test case - http://www.c

Re: [PHP] webmin mods..

2009-03-22 Thread Michael A. Peters
bruce wrote: oh... has anyone ever played/used/modified the webmin app?? i'm looking for a web based app/tool that i can modify to be able to manage my distribbuted client/server crawler on my network of boxes. i'd rather start with an existing framework/app that already kind of

Re: [PHP] DOMElement - attributes and namespace

2009-03-22 Thread Michael A. Peters
Michael A. Peters wrote: Michael A. Peters wrote: At some point I'll get the guts to report it as a bug just to be told it isn't a bug with the standard response that says it isn't a bug and absolutely no explanation as to why. Bug ID 47747 Clear demonstration te

Re: [PHP] Proper code formatting

2009-03-23 Thread Michael A. Peters
assume its not bill; and do the fred thing; } } // note that you were missing a } - easy to miss with your style Of course - it is better like this if ($variable == 'this') { do this; and this; } elseif ($name == 'bill') { do something with bill

Re: [PHP] Proper code formatting

2009-03-23 Thread Michael A. Peters
Bob McConnell wrote: To take this question a step further, is there a PHP best practices document available? I am looking for one that I can give to a new programmer and tell her "do it this way until you can explain to me why you shouldn't." Bob McConnell I just remembere

Re: [PHP] Proper code formatting

2009-03-23 Thread Michael A. Peters
George Larson wrote: Well, I was pondering making a recommendation, of sorts. I work in an environment with various levels of coders, perhaps similar to your description. Currently, there are no standards that I have seen. We all are bringing our coding habits with us. I don't know if

Re: [PHP] Frameworks / obstinate?

2009-03-23 Thread Michael A. Peters
Sancar Saran wrote: Probably a bit off topic and The Game is over man. Javascript coming with flank speed. Next generation JS Framworks will take html generation jobs from server side. No it won't. People are getting sick and tired of allowing third scripts to modify the DOM - browser

Re: [PHP] Frameworks / obstinate?

2009-03-23 Thread Michael A. Peters
Daniel Kolbo wrote: P.P.P.S. What might be nice is to have an online repository of "PHP community approved" classes, then programmers could mix and match 'modules' as needed...well now I am sounding like that snake oil salesman. There is a php class web sit

Re: [PHP] Frameworks / obstinate?

2009-03-23 Thread Michael A. Peters
an be wrapped in a class and probably should be for public distribution as it avoids function name clashes (though you still have class name clashes to worry about ...) If as a programmer you find a particular function nifty but don't care for the class, you can always rip it out of the class fo

Re: [PHP] Frameworks / obstinate?

2009-03-23 Thread Michael A. Peters
( google, zoho etc ). Your server will never handle a large load like that for any number of users. I didn't say third party scripts should not be used. I did say that you will need to specify a particular part of the page the third party script is allowed to modify - both in your documen

Re: [PHP] Tripple The Fun

2009-03-24 Thread Michael A. Peters
d($headers); $message = $reply->createTextNode("About halfway through this, I realized I should have just used phpMailer instead of DOMDocument"); $body->appendChild($message); $reply->appendChild($body); print $reply->saveXML(); abdulazeez alugo wrote: Hello guys, The l

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Michael A. Peters
Ken Watkins wrote: Hi all. Newbie here. I have set up a blog site where my family creates posts and they get emailed to members of the family. To keep up with their identities, I created a script for each family member to run (dad.php, mom.php, etc.), and it sets a cookie on each computer

Re: [PHP] pdflib greek problem

2009-03-27 Thread Michael A. Peters
Thodoris wrote: Hi, I am trying the following code to generate a pdf: try { // Create a new pdf handler $pdf = new PDFlib(); // open new PDF file if ($pdf->begin_document("", "") == 0) { die("Error: " . $p->ge

Re: [PHP] Security Support

2009-03-29 Thread Michael A. Peters
this community has the knowledge to act as a security consultant in an occasional, as required basis. Anyone interested should have expience with Apache, PHP, Perl on the FreeBSD platform. No experience with FreeBSD and probably not enough with Perl - but whoever you hire, make sure they suggest

Re: [PHP] Security Support

2009-03-29 Thread Michael A. Peters
Marc Christopher Hall wrote: I is a hi skool gradjuate Yea, dude, well me GED says I kin git it dun wit less wastid time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] Read Text Content from PDF file

2009-03-30 Thread Michael A. Peters
Andrei Bintintan wrote: Any other ideas? I believe there is a windows binary called pdf2txt.exe out there somewhere. I doubt you will find any solution that does not require installation of a binary on the server, so if you can't install xpdf on the server then you probably will ha

Re: AW: [PHP] Read Text Content from PDF file

2009-03-30 Thread Michael A. Peters
Andrei Bintintan wrote: Any other ideas? Also - I believe the commercial (full) version of PDFlib can - in fact, I believe you can do it with the pecl-pdflib library if you have the full version of pdflib installed. I seem to remember there work on a clibpdf php wrapper back when php 4

Re: AW: [PHP] Read Text Content from PDF file

2009-03-30 Thread Michael A. Peters
haliphax wrote: On Mon, Mar 30, 2009 at 3:16 AM, Michael A. Peters wrote: Andrei Bintintan wrote: Any other ideas? Also - I believe the commercial (full) version of PDFlib can - in fact, I believe you can do it with the pecl-pdflib library if you have the full version of pdflib installed

Re: [PHP] 5.2.9 changes - phpwiki

2009-03-30 Thread Michael A. Peters
Charles Sprickman wrote: Hello all, Recently I upgraded a box running phpwiki from php 5.2.8 to 5.2.9. After the upgrade, phpwiki (1.3.14) started spitting out the following two errors, both of which are basically leaving the wiki dead in the water: [30-Mar-2009 22:01:23] PHP Parse error

Re: [PHP] 5.2.9 changes - phpwiki

2009-03-31 Thread Michael A. Peters
Charles Sprickman wrote: On Mon, 30 Mar 2009, Michael A. Peters wrote: Charles Sprickman wrote: Hello all, Recently I upgraded a box running phpwiki from php 5.2.8 to 5.2.9. After the upgrade, phpwiki (1.3.14) started spitting out the following two errors, both of which are basically

Re: [PHP] extention question

2009-04-01 Thread Michael A. Peters
restart If you are looking as to whether or not you already have it - put this in a page: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] extention question

2009-04-01 Thread Michael A. Peters
Per Jessen wrote: MikeP wrote: Hello, How do I know if an extension (specifically php-domxml) has to be compiled or can just be loaded. To see if it has already been compiled, check /usr/lib/phpx/extensions /Per I don't believe that is the right path on rhel - it certainly isn't on cent

Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Michael A. Peters
ers[calling_url]" value="categories-bulk-ear Does anyone know of a way around this? Thanks Don't use [] in an ID - it doesn't belong there. If you are not using the ID for a hook, just drop it - the ID doesn't need to be there. The name attribute is where you want the []

Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Michael A. Peters
tedd wrote: At 4:03 AM -0700 4/2/09, Michael A. Peters wrote: Shaun Thornburgh wrote: Hi, We are getting errors when trying to vaildate our HTML due to the [ character when using Post Arrays: Line 173, Column 65: character "[" is not allowed in the value of attribut

Re: [PHP] syntax woes

2009-04-02 Thread Michael A. Peters
Chris wrote: Shawn McKenzie wrote: Chris wrote: Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. Or if the script is running as a user/group that has write permissions to the dir/file

Re: [PHP] syntax woes

2009-04-03 Thread Michael A. Peters
Jan G.B. wrote: you don't need the "ugly" . " " . "string" . "merging". um, I guess most of my code is ugly ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Michael A. Peters
Andrew Williams wrote: HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet Explorer Install Linux ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] filter in phpself()

2009-04-03 Thread Michael A. Peters
I was looking over the output of phpfilter() and say the following: Input Validation and Filtering enabled Revision$Revision: 1.52.2.45 $ I did recently (very recently) upgrade from php 5.2.5 to 5.2.9 and also upgraded my php pear to 1.7.2 (from whatever CentOS 5.2 had)

Re: [PHP] filter in phpself()

2009-04-03 Thread Michael A. Peters
Michael A. Peters wrote: I was looking over the output of phpfilter() and say the following: Input Validation and Filteringenabled Revision$Revision: 1.52.2.45 $ I did recently (very recently) upgrade from php 5.2.5 to 5.2.9 and also upgraded my php pear to 1.7.2 (from

[PHP] suhosin and sessions

2009-04-04 Thread Michael A. Peters
suhosin forum is currently down so I can't ask there. I'm using https for login but the rest of the site is not https www.domain.com is regular secure.domain.com is https I set the session cookie this way: ini_set("session.cookie_domain",".domain.com"); Works beautifully w/o suhosin - the log

Re: [PHP] PHP/MySQL ISP recommendation that lets one edit ft_min_word_len variable?

2009-04-04 Thread Michael A. Peters
Rob Gould wrote: Can anyone here recommend an ISP that will let me have a dedicated server (not shared), and also allow me to adjust the ft_min_word_len mySQL parameter? I was originally thinking Dreamhost PS, but I recently found out that they do not allow changes to mySQL environmental

Re: [PHP] suhosin and sessions

2009-04-04 Thread Michael A. Peters
Michael A. Peters wrote: suhosin forum is currently down so I can't ask there. I'm using https for login but the rest of the site is not https www.domain.com is regular secure.domain.com is https I set the session cookie this way: ini_set("session.cookie_domain",&q

Re: [PHP] I'm new

2009-04-05 Thread Michael A. Peters
Ashley Sheridan wrote: also, it's best to reply back to the list, as your questions might help others, and it's always good to have as much feedback as you can from everyone on the list! I think this may be the only major list I'm on that does not default reply to the list. It's rather an

[PHP] phpMyAdmin, suhosin, proper solutions

2009-04-05 Thread Michael A. Peters
e documentation on how to make them play nice, and to me it is unacceptable to change suhosin settings intended to protect my users and my site from a malicious user so that I can use a web app that is not open to the public. There are a couple solutions I can think of, I'm interested i

Re: [PHP] phpMyAdmin, suhosin, proper solutions

2009-04-05 Thread Michael A. Peters
Chris wrote: Yes, I read the documentation on how to make them play nice, and to me it is unacceptable to change suhosin settings intended to protect my users and my site from a malicious user so that I can use a web app that is not open to the public. No idea what the problems are (couldn&#

[PHP] [solved] Re: [PHP] phpMyAdmin, suhosin, proper solutions

2009-04-05 Thread Michael A. Peters
Michael A. Peters wrote: Chris wrote: Yes, I read the documentation on how to make them play nice, and to me it is unacceptable to change suhosin settings intended to protect my users and my site from a malicious user so that I can use a web app that is not open to the public. No idea what

php-general@lists.php.net

2009-04-06 Thread Michael A. Peters
I'm looking through various documentation on MDB2 In some examples the assignment operator looks like it is mixed with a bitwise or logic operator - IE $mdb2 =& MDB2::factory($dsn); Other examples though just have $mdb2 = MDB2::factory($dsn); I'm trying to figure out exactl

Re: [PHP] PHP bandwidth control

2009-04-06 Thread Michael A. Peters
Yannick Mortier wrote: 2009/4/6 JD : Hello, I am relatively new to PHP and am trying to make a video/image sharing site for my family to upload and share family videos and pictures. My concern is that because I'm hosting this site at my house, I will quickly exceed my bandwidth limita

php-general@lists.php.net

2009-04-06 Thread Michael A. Peters
Marc wrote: I'm looking through various documentation on MDB2 In some examples the assignment operator looks like it is mixed with a bitwise or logic operator - IE $mdb2 =& MDB2::factory($dsn); Other examples though just have $mdb2 = MDB2::factory($dsn); With the =& operator

Re: [PHP] PHP bandwidth control

2009-04-07 Thread Michael A. Peters
ce. I suspect what happened is a squatter also thought up the name and registered it - GoDaddy will sell domains for squatters. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP bandwidth control

2009-04-07 Thread Michael A. Peters
JD wrote: Theres always something to learn in PHP Land. Yeah - and I always seem to find slick new one or two line solutions after I've written a bunch of lines to clumsily do the same thing. I guess that's how it is when you first start to get semi-serious about a language (e

Re: [PHP] Best Practices for Hiding Errors

2009-04-07 Thread Michael A. Peters
9el wrote: Intead of displaying errors to page. Its better to use error log file. I believe by default they are sent to the server error log file regardless of your error report setting. It wouldn't surprise me if there's a slick class out there for parsing the error log and extr

Re: [PHP] difficult select problem

2009-04-07 Thread Michael A. Peters
PJ wrote: Bob McConnell wrote: From: PJ First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A

Re: [PHP] PHP bandwidth control

2009-04-07 Thread Michael A. Peters
they're still $7.95. This is of interest to me as well. My old registrar iyd.com was sold to hover.com and the new guys have some serious problems. I've been thinking about combining my ~70 domain names into a single registrar and GoDaddy looks good thus far. So, I would like to

Re: [PHP] Am I being hacked?

2009-04-08 Thread Michael A. Peters
Andrew Ballard wrote: You don't need a disassembler; I already said what that string is intended to do. If it is allowed to run on Microsoft's SQL Server, the hex value is implicitly converted to the string "WAITFOR DELAY '00:00:10'", which is then executed.

Re: [PHP] How can I echo a javascript var in an email subject line? Possible?

2009-04-08 Thread Michael A. Peters
Terion Miller wrote: I have a php form, that uses a javascript word counter to make sure submissions are a certain number of words, I have now been tasked with taking that word count and having it pass in the email that gets sent when someone submits a form ..in the subject line. Here is the

Re: [PHP] How can I echo a javascript var in an email subject line? Possible?

2009-04-08 Thread Michael A. Peters
Terion Miller wrote: javascript is client side. php is server side. To use something client side in a server side script, the web page has to send it to the server from the client. The best way to do what you want to do is probably to do the work count server side, but

Re: [PHP] How can I echo a javascript var in an email subject line? Possible?

2009-04-08 Thread Michael A. Peters
Terion Miller wrote: On Wed, Apr 8, 2009 at 12:50 PM, Michael A. Peters <mailto:mpet...@mac.com>> wrote: Terion Miller wrote: javascript is client side. php is server side. To use something client side in a server side script, the web

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael A. Peters
Raymond Irving wrote: Hello, I'm thinking that it's about time a saveXHTML() method be added to the DOM objects. Not necessary. saveXML() already does what is needed to provide valid xhtml output. See the php source of http://www.clfsrpm.net/xss/dom_script_test.phps to see h

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael A. Peters
Michael Shadle wrote: i think it should also be fully utf-8 capable. saveHTML is not for me right now, and i have to run some preg_replace to remove the etc chunks, and the output is not utf-8, even though the input is. i got a workaround using html_decode_entities() or something like that but

Re: [PHP] Re: PHP and Send Mail

2009-04-08 Thread Michael A. Peters
9el wrote: On Thu, Apr 9, 2009 at 7:19 AM, Shawn McKenzie wrote: Alejandro Esteban Galvez wrote: Hi!, I am making a web system and i need known how send a mail using PHP Hi, Use PHPmailer or PEAR:mail() I second PHPmailer. It rocks! -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-09 Thread Michael A. Peters
Michael Shadle wrote: On Wed, Apr 8, 2009 at 8:58 PM, Michael A. Peters wrote: Yes it should - I believe php 6 is suppose to be much better at native UTF8. At least according to some blog I read somewhere (IE don't believe me without reservation, it's third hand knowledge at bes

Re: [PHP] Re: PHP and Send Mail

2009-04-09 Thread Michael A. Peters
Bob McConnell wrote: *snip* Just be aware that it does have a few bugs you may need to work around or patch. The SourceForge tracker is at <http://sourceforge.net/tracker/?group_id=26031&atid=385707>. I submitted two reports last year against 1.73 which the tracker says were summar

Re: [PHP] Re: unknown number of inputs

2009-04-10 Thread Michael A. Peters
Phpster wrote: On Apr 10, 2009, at 12:44, Al wrote: PJ wrote: I have a script with $_POST and to load data with text input. Situation: enter name of author(s) for book. I have the script set up to enter first_name, last_name for Author1 and the same for Author 2. Check if entry 1 exists

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Michael A. Peters
Raymond Irving wrote: --- On Wed, 4/8/09, Michael A. Peters wrote: From: Michael A. Peters Subject: Re: [PHP] How about a saveXHTML for the DOM? saveXML() already does what is needed to provide valid xhtml output. From my test it sometimes generate this like at the end of the page

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Michael A. Peters
Michael A. Peters wrote: $myxhtml->loadXML($xmlstring); $elements = $myxhtml->getElementsByTagName("html"); $xmlHtml = $elements->item(0); ?> forgot this tidbit - setAttribute("xmlns","http://www.w3.org/1999/xhtml";); $xmlHtml->setAttributeNS(&#x

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Michael A. Peters
27;ve seen that appear in textarea as well - I believe it has to do with the libebreaks of the application that created the file (or in case of textarea from a form, the line break convention of the browser). Does it happen when you run sed -i 's/\r//g' file.html to remove the DOS

[PHP] pear mdb2 and null

2009-04-11 Thread Michael A. Peters
I've run into a small issue with mdb2. I have a mysql database with a field set to longtext not null. inserting "" into that field works just dandy when using the mysql_ functions. However, when using mdb2 - it converts "" to NULL which is NOT what I want to have

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-11 Thread Michael A. Peters
Raymond Irving wrote: If I remove the \r from the file using preg_replace() then it shows up just fine. I was just wondering if there was a way to suppress the \r in the xml output. Another thing that I've observed while looking at your code is that it only works best for dynamic web

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-11 Thread Michael A. Peters
Michael A. Peters wrote: With respect to templating systems, I don't use them but if you have a DOMDocument orientated template system, I don't see why it couldn't do the same thing - As an experiment, I took one of my pages that was a little sluggish due to lots of

Re: [PHP] pear mdb2 and null

2009-04-12 Thread Michael A. Peters
Phpster wrote: On Apr 11, 2009, at 21:38, "Michael A. Peters" wrote: I've run into a small issue with mdb2. I have a mysql database with a field set to longtext not null. inserting "" into that field works just dandy when using the mysql_ functions. Howe

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread Michael A. Peters
Jason Pruim wrote: On Apr 12, 2009, at 1:48 PM, Ron Piggott wrote: Thanks. I got my script updated. Ron There are a few other thing's that I didn't see mentioned... The best description of when to use what, is this.. Use POST when you are submitting a form for storing info,

Re: [PHP] Re: $_GET verses $_POST

2009-04-12 Thread Michael A. Peters
Micah Gersten wrote: Ron Piggott wrote: How do I know when to use $_GET verses $_POST? Is there a pre defined variable that does both? Ron One of the things usually left out of this discussion is the actual intended use for each of these. I submit the following 2 reference links: http

Re: [PHP] pear mdb2 and null

2009-04-12 Thread Michael A. Peters
Michael A. Peters wrote: Phpster wrote: On Apr 11, 2009, at 21:38, "Michael A. Peters" wrote: I've run into a small issue with mdb2. I have a mysql database with a field set to longtext not null. inserting "" into that field works just dandy when using the mys

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Michael A. Peters
Raymond Irving wrote: Hello, After talking with Michael about how to generate XHTML code using the DOM I came up with this little function that I'm thinking of using to generate XHTML code that's HTML compatible: function saveXHTML($dom) { $html = $dom->saveXML(null,LIBXML_NOEMPTYTAG);

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael Shadle wrote: On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving wrote: $html = preg_replace('/<\!\[CDATA\[(.*)\]\]><\/script>/s','//',$html); question - the output of this would be right? is the cdata truly necessary? I typically use XHTML 1.0 transit

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael A. Peters wrote: function makeHTML($document) { $buffer = $document->saveHTML(); $output = html_entity_decode($buffer,ENT_QUOTES,"UTF-8"); return $output; } I'll try it and see what it does. Huh - not tried above yet - but with $test = $myxhtml

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael A. Peters wrote: I wonder if the real utf8 problem people experience is really with loadHTML() and not with saveHTML() ?? Go to http://www.clfsrpm.net/xss/dom_script_test.php The page was meant to test something else but enter some UTF-8 into the textarea (well formed xhtml

<    13   14   15   16   17   18   19   20   21   22   >