Re: [PHP] Pirate PHP books online?
On 17/07/07, David Powers <[EMAIL PROTECTED]> wrote: Crayon Shin Chan wrote: > What makes you think any of the authors are subscribed to this list? I am subscribed to this list, and I'm disgusted that somebody posted the URL to the pirate site. I see that more than 2,000 copies of my "PHP Solutions: Dynamic Web Design Made Easy" have been downloaded. Although eBooks are cheaper than the printed version, the royalties to an author are much higher (no printing, storage, or delivery costs). I'm not starving, but the loss in revenue is far from trivial, and reduces the incentive to continue to write. I have reported the site to my publisher. Even if it's closed down, my work has already been stolen. David, I am the OP, and I have not posted the URL to the pirate site. Nor did I see it posted anywhere. Check the email, maybe someone else sent it to you directly. Dotan Cohen http://lyricslist.com/ http://what-is-what.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] end this thread? Re: [PHP] Re: Pirate PHP books online?
> > It's like defining good and evil -- at some point in the conversation > someone is going to use the words God or satan. > that's rather narrow minded. t. ps. sorry, i just thought i would spam some as well... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] coder needed
Pro-Net have a requirement for ether a full time php/msql coder or a good freelancer. Position is to start within two weeks based in London. If anyone is interested, please contact me 0870 835 6911 or 07900 894 044 Sorry if i'm posting to the wrong list. Danial Subhani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] If MySQL column/field values are in an PHP array
I created an array using the following: $in_list = "'".join("','",$cen_chiefs)."'"; //$cen_chiefs is an array $query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list})"; How would I go about adding an AND clause to the above query to return all rows where strName column values are in $in_list array I acutally did the above w/ "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list}) AND (strName) IN({$in_list}) ORDER BY conName"; // This return zero rows. I think I Should I be using strName as a pattern, because strName would be a partial value of $in_list array values? Something like: REGEXP '^.$' "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName"; //This query doesn't work by the way. This is where I'm stuck. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
Dotan Cohen wrote: David, I am the OP, and I have not posted the URL to the pirate site. Nor did I see it posted anywhere. Check the email, maybe someone else sent it to you directly. Dotan, I'm fully aware that you didn't post the URL, and I apologize if my post gave the impression that you were the culprit. The URL was posted by another person approximately six hours after your original post. It might have been removed from the web interface, but it's definitely still there in my newsreader. It has been quite fascinating to read this thread, even though it has nothing to do with PHP. As an author, I have frequently thought about the contradiction between the fact that PHP is free and open source, but I claim copyright and payment for the books I write about it. But it's no secret that many people involved in developing open source software make a living selling their knowledge in one way or another, either as consultants or developers. Although I don't have the skills to contribute to the core development of PHP, I hope that my books help others use PHP in a productive and secure manner. With regard to the argument about free flow of information, all the information in my books is freely available on the internet. However, the value to most readers is that I have pulled together that information, tested it, and presented it in a form that, hopefully, makes it easier for beginners and intermediate developers to understand. Since it takes six months to a year to produce a book, I don't think it's unreasonable to expect readers to pay for it. Unfortunately, computer books are expensive. Few people realize that only a tiny proportion of the price goes to the author. That's why unauthorized distribution cuts so deeply into an author's income. David Powers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
2007. 07. 19, csütörtök keltezéssel 13.28-kor David Powers ezt írta: > Dotan Cohen wrote: > > David, I am the OP, and I have not posted the URL to the pirate site. > > Nor did I see it posted anywhere. Check the email, maybe someone else > > sent it to you directly. > > Dotan, I'm fully aware that you didn't post the URL, and I apologize if > my post gave the impression that you were the culprit. The URL was > posted by another person approximately six hours after your original > post. It might have been removed from the web interface, but it's > definitely still there in my newsreader. > > It has been quite fascinating to read this thread, even though it has > nothing to do with PHP. As an author, I have frequently thought about > the contradiction between the fact that PHP is free and open source, but > I claim copyright and payment for the books I write about it. But it's > no secret that many people involved in developing open source software > make a living selling their knowledge in one way or another, either as > consultants or developers. Although I don't have the skills to > contribute to the core development of PHP, I hope that my books help > others use PHP in a productive and secure manner. > > With regard to the argument about free flow of information, all the > information in my books is freely available on the internet. However, > the value to most readers is that I have pulled together that > information, tested it, and presented it in a form that, hopefully, > makes it easier for beginners and intermediate developers to understand. > Since it takes six months to a year to produce a book, I don't think > it's unreasonable to expect readers to pay for it. Unfortunately, > computer books are expensive. Few people realize that only a tiny > proportion of the price goes to the author. That's why unauthorized > distribution cuts so deeply into an author's income. I didn't want to get involved in this thread, though it was interesting to read... However, an idea just came into my mind: what if you, as the author, could offer a download for a price which would be the same as what you get after a sold paper copy? According to what you just said, it would be much cheaper for the download than for a paper copy, which might cause more or less of the downloaders of the pirated file to download it legally and pay this smaller price to you. I admit that it won't stop pirating, but it might be good for those who are willing to pay to you, but either can't afford the paper copy or are not willing to pay to the publishing company - and it might increase your revenues a bit too. greets Zoltán Németh > > David Powers > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating a text file
On 7/18/07, Ryan Lao <[EMAIL PROTECTED]> wrote: Thanks for your reply, I want to create individual text files for every form submitted. ""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On 7/17/07, Ryan Lao <[EMAIL PROTECTED]> wrote: > > i made a simple PHP form that would ask for the users complete name, a > > button that would browse to a file that the user wants to upload, a text > > area for additional comments, and a submit button. This form works just > > fine. what i want to achieve next is for my form to also create a text file > > when it is submitted. The text file will contain the users complete name, > > the filename that was being uploaded and the additional comments from the > > user. Can anyone give me some ideas on how to do this? > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > Ryan, > > Are you trying to create individual files for each form > submission, or one file that will be appended with new data upon > submission? > > -- > Daniel P. Brown > [office] (570-) 587-7080 Ext. 272 > [mobile] (570-) 766-8107 Ryan, Please keep your replies on the list so that others may benefit as well. Here's a very, very simple example that will handle individual, unique file creation each time the form is submitted: First Name: Last Name: File: Comments: -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On 7/19/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: 2007. 07. 19, csütörtök keltezéssel 13.28-kor David Powers ezt írta: > Dotan Cohen wrote: > > David, I am the OP, and I have not posted the URL to the pirate site. > > Nor did I see it posted anywhere. Check the email, maybe someone else > > sent it to you directly. > > Dotan, I'm fully aware that you didn't post the URL, and I apologize if > my post gave the impression that you were the culprit. The URL was > posted by another person approximately six hours after your original > post. It might have been removed from the web interface, but it's > definitely still there in my newsreader. > > It has been quite fascinating to read this thread, even though it has > nothing to do with PHP. As an author, I have frequently thought about > the contradiction between the fact that PHP is free and open source, but > I claim copyright and payment for the books I write about it. But it's > no secret that many people involved in developing open source software > make a living selling their knowledge in one way or another, either as > consultants or developers. Although I don't have the skills to > contribute to the core development of PHP, I hope that my books help > others use PHP in a productive and secure manner. > > With regard to the argument about free flow of information, all the > information in my books is freely available on the internet. However, > the value to most readers is that I have pulled together that > information, tested it, and presented it in a form that, hopefully, > makes it easier for beginners and intermediate developers to understand. > Since it takes six months to a year to produce a book, I don't think > it's unreasonable to expect readers to pay for it. Unfortunately, > computer books are expensive. Few people realize that only a tiny > proportion of the price goes to the author. That's why unauthorized > distribution cuts so deeply into an author's income. I didn't want to get involved in this thread, though it was interesting to read... However, an idea just came into my mind: what if you, as the author, could offer a download for a price which would be the same as what you get after a sold paper copy? According to what you just said, it would be much cheaper for the download than for a paper copy, which might cause more or less of the downloaders of the pirated file to download it legally and pay this smaller price to you. I admit that it won't stop pirating, but it might be good for those who are willing to pay to you, but either can't afford the paper copy or are not willing to pay to the publishing company - and it might increase your revenues a bit too. greets Zoltán Németh > > David Powers > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The problem with that, though, is that a lot of publishers require exclusivity, so an author is bound (no pun intended) by contract not to publish elsewhere - including on their own website. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
On Wednesday 18 July 2007, Jay Blanchard wrote: > [snip] > ...all manner of interesting debate... > [/snip] > > What, exactly, is the difference between this particular brand of > copyright infringement and taking the book from a bookstore without > paying for it? Am I committing copyright infringement by standing in the > store and reading the book? If you go into a bookstore and take a book out without the permission of the store owner, that is stealing/theft and the victim is the store. (That permission is implicit in paying for it, since that involves a transfer of ownership, but it's the lack of permission that makes it illegal rather than the lack of money transfer.) If you then xerox that book and sell copies of that xerox to people on the street, that's copyright infringement and the victim is the copyright holder (note I said holder, not owner). If you go into a bookstore, pick up a book, and start reading it while standing next to the shelf, that may or may not be against store policy. Some stores actually have cafes where they encourage you to do exactly that, but others would ask you to leave. The first two are both illegal, and covered by two entirely different branches of law with two entirely different sets of reasoning behind them. The third is not illegal but a matter of policy on private property. And a side note, while this thread may not have anything to do with PHP code it is vitally important that those involved in the creation and business of information and expression understand copyright law. You don't need to be a professional lawyer, but the amount of misinformation out there about copyright, on all sides of the debate, is simply mind-boggling. That hurts everyone, because the law is not always doing what is "right" (by some definition of right). You can't know that, though, or make an informed decision about how you wan to license your work, unless you understand what the law actually is and why it is the way it is. So as PHP professionals, copyright law is on-topic, even if not code-related. -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On Thursday 19 July 2007, Daniel Brown wrote: > > I didn't want to get involved in this thread, though it was interesting > > to read... > > However, an idea just came into my mind: what if you, as the author, > > could offer a download for a price which would be the same as what you > > get after a sold paper copy? According to what you just said, it would > > be much cheaper for the download than for a paper copy, which might > > cause more or less of the downloaders of the pirated file to download it > > legally and pay this smaller price to you. > > I admit that it won't stop pirating, but it might be good for those who > > are willing to pay to you, but either can't afford the paper copy or are > > not willing to pay to the publishing company - and it might increase > > your revenues a bit too. > > > > greets > > Zoltán Németh > > > > > David Powers > The problem with that, though, is that a lot of publishers require > exclusivity, so an author is bound (no pun intended) by contract not > to publish elsewhere - including on their own website. > > -- > Daniel P. Brown That is, however, a very common argument in favor of online distribution. It cuts out the middle-men, reduces costs, saves trees, and increases the revenue per unit for the original author/artist. Of course, the copyright cartels (which includes most book publishers) object to that because they're the middle-men being cut out, and that's how you get exclusivity contracts, DRM, and similar anti-artist and anti-consumer bad things. -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Pirate PHP books online?
> > The problem with that, though, is that a lot of publishers require > exclusivity, so an author is bound (no pun intended) by contract not > to publish elsewhere - including on their own website. > The idea of even offering an electronic version should be to drive sales for the hard copy. Maybe offer a "Condensed Version" electronically, that has enough content that readers can get enough of a feel for the product to drive a buying decision. Throughout, make reference to the full version having more complete content, complete with an "order now" link. This method worked well for Readers Digest! JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: If MySQL column/field values are in an PHP array
kvigor wrote: I created an array using the following: $in_list = "'".join("','",$cen_chiefs)."'"; //$cen_chiefs is an array $query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list})"; How would I go about adding an AND clause to the above query to return all rows where strName column values are in $in_list array I acutally did the above w/ "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list}) AND (strName) IN({$in_list}) ORDER BY conName"; // This return zero rows. I think I Should I be using strName as a pattern, because strName would be a partial value of $in_list array values? Something like: REGEXP '^.$' "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName"; //This query doesn't work by the way. This is where I'm stuck. First of all, let's start by saying that this question is very OT on a php-list. It would be a lot more appropriate on a mysql list. But, I'll try to help you anyway. First of all, I have no clue what you're trying to do. Give some values (ie. what's in $cen_chiefs, what does the central table look like, and what does strName look like. The whole problem here, afaics, is that you don't have a clear idea of what you want. Tell us what you _want_ to do (not HOW, but what the result should be) and we might be able to help. Now, SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName won't work simply because you're saying (php-style): if($foo == $a.' '.$b && $foo == $a), which obviously will _never_ work :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session_decode from session handler
I'm having an issue getting session_decode to work from my session handler in PHP 5.2.3. Here's a short code snippet that demonstrates what I'm trying to do (from my read handler) - public function read($id) { var_dump($data); // prints out the serialized session correctly $retval = session_decode($data); var_dump($_SESSION); // prints out "array(0) {}" echo $retval; // prints false return $data; } In my calling function, $_SESSION is updated with everything that was held in $data, which means that $data was not corrupt - it worked when I returned it, but it did not work when I used session_decode. This is a problem because I want to change my read($id) function so that it decodes $data, adds something extra to the $_SESSION, then re-encodes $data and returns it. Thanks, - Ryan Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/
Re: [PHP] Pirate PHP books online?
Jim Moseby wrote: >> The problem with that, though, is that a lot of publishers require >> exclusivity, so an author is bound (no pun intended) by contract not >> to publish elsewhere - including on their own website. >> > The idea of even offering an electronic version should be to drive sales for > the hard copy. Maybe offer a "Condensed Version" electronically, that has > enough content that readers can get enough of a feel for the product to > drive a buying decision. Throughout, make reference to the full version > having more complete content, complete with an "order now" link. This > method worked well for Readers Digest! Or watermark the .pdf with something that uniquely identifies each copy - this could be done with a script at the time of the order. Maybe the name of the original buyer, or the order number, etc. Doesn't prevent the piracy, but does give traceability should you wish to pursue the pirate. Regards, Austin. signature.asc Description: OpenPGP digital signature
Re: [PHP] Pirate PHP books online?
On 7/19/07, Austin Denyer <[EMAIL PROTECTED]> wrote: Jim Moseby wrote: >> The problem with that, though, is that a lot of publishers require >> exclusivity, so an author is bound (no pun intended) by contract not >> to publish elsewhere - including on their own website. >> > The idea of even offering an electronic version should be to drive sales for > the hard copy. Maybe offer a "Condensed Version" electronically, that has > enough content that readers can get enough of a feel for the product to > drive a buying decision. Throughout, make reference to the full version > having more complete content, complete with an "order now" link. This > method worked well for Readers Digest! Or watermark the .pdf with something that uniquely identifies each copy - this could be done with a script at the time of the order. Maybe the name of the original buyer, or the order number, etc. Doesn't prevent the piracy, but does give traceability should you wish to pursue the pirate. Regards, Austin. One word: Useless! The watermark can be easily removed, and the guy who puts in on the net will simply remove it, and can't be traced :) Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
At 8:48 AM -0500 7/19/07, Larry Garfield wrote: And a side note, while this thread may not have anything to do with PHP code it is vitally important that those involved in the creation and business of information and expression understand copyright law. You don't need to be a professional lawyer, but the amount of misinformation out there about copyright, on all sides of the debate, is simply mind-boggling. That hurts everyone, because the law is not always doing what is "right" (by some definition of right). You can't know that, though, or make an informed decision about how you wan to license your work, unless you understand what the law actually is and why it is the way it is. So as PHP professionals, copyright law is on-topic, even if not code-related. -- Larry Garfield AIM: LOLG42 I totally agree -- whenever someone does something you don't think is right, regardless of what's called, hire an attorney. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
At 8:52 AM -0500 7/19/07, Larry Garfield wrote: On Thursday 19 July 2007, Daniel Brown wrote: > The problem with that, though, is that a lot of publishers require exclusivity, so an author is bound (no pun intended) by contract not to publish elsewhere - including on their own website. -- Daniel P. Brown That is, however, a very common argument in favor of online distribution. It cuts out the middle-men, reduces costs, saves trees, and increases the revenue per unit for the original author/artist. Of course, the copyright cartels (which includes most book publishers) object to that because they're the middle-men being cut out, and that's how you get exclusivity contracts, DRM, and similar anti-artist and anti-consumer bad things. -- Larry Garfield AIM: LOLG42 Bad things? A publisher, and most other middleman, provide some sort of service -- and it's reasonable to expect them to protect their investment. Nobody (except me) works for nothing. If you want to go on your own, no problem then you handle the marketing, distributing, advertising, collections, liability, copyright, security, and all the rest of the responsibilities that "doing it yourself" entails. However, understand that if you write the best book ever, it might not be realized until after you're dead. So, begins the "trade-off's" that we all have to make. As a consumer, you want buy the the "best" book? Are you willing to search the net until you find some "out of the way" author who says his book is the best and then trust that it is? OR, are you more comfortable with buying from your local book store where known publisher place their books? Everything is a trade-off. Risk vs value. It's one thing to say "If we cut out the middleman, then we can all buy cheaper books!" -- but it's another to find books worth buying without a publisher. I never met a man/profession that didn't provide some improvement to the overall quality of life -- except of course politicians and insurance companies. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
At 7:05 PM -0500 7/18/07, Larry Garfield wrote: On Wednesday 18 July 2007, tedd wrote: And just because they do, doesn't make it any less accurate either. I don't care if Hitler agreed with me, there is a fundamental wrongful act of taking something that is not yours regardless of what you, and others, may call it. First "Hitler and the Nazis"[1] reference. You lose! Thanks for playing. :-) [1] http://en.wikipedia.org/wiki/Godwin's_Law Just part of the Political Correctness bull. http://www.reason.com/news/show/32944.html Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] converting extended chars to plain ascii
Hello, A libarary I'm using (the cybersource api if it helps any) is dying when I pass it "extended" chars - such as bjorn (two dots over the o - not sure of the actual name of this char -sorry). For some reason, the newest version of cybersourc's api aborts on this input. Can anyone recommend a quick way to strip/convert those chars out before I pass it to cybersources lib? I store the data as a varchar in mysql and pull it out in a query. Thanks for ANY advice. I need to get some sort of fix for this asap. cybersource are no help. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling/Building PHP 5.2.3 on Mac OS X 10.3.9
Ave, I¹m running php 5.0.2 on Mac OS X 10.3.9 (Panther) which I had installed using entropy.ch¹s installer. Time to upgrade but not sure which way to go. Apparently Entropy does not support anything < 10.4 (Tiger). I¹ve looked around macports & fink but can¹t get any clear direction. Tried macports but it gave nothing but errors. So at this point I¹m considering building/compiling php 5.2.3 on my mac. I¹m no *nix expert and I¹ve never compiled anything (relatively critical) before. Looking for the right direction to instructions or knowledge on how to go about doing this. Unless anyone has a better solution of getting php 5.2.3 on mac os x 10.3.9 Thanks. ~~~ Rahul Sitaram Johari CEO, Twenty Four Seventy Nine Inc. W: http://www.rahulsjohari.com E: [EMAIL PROTECTED] ³I morti non sono piu soli ... The dead are no longer lonely²
Re: [PHP] Compiling/Building PHP 5.2.3 on Mac OS X 10.3.9
On 7/19/07, Rahul Sitaram Johari <[EMAIL PROTECTED]> wrote: Unless anyone has a better solution of getting php 5.2.3 on mac os x 10.3.9 http://destiney.com/blog/php-4-5-macos-x -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
At 7:01 PM -0500 7/18/07, Larry Garfield wrote: On Wednesday 18 July 2007, tedd wrote: > And, I've spent enough time in court to know the difference. Apparently not. And how much time have you spent in court? Rhetorical question and not germane to the topic, but I have spent a considerable amount of time in court. > I am always surprised as to how simple wrongful acts can be diminished with spin. We live in a world of political correctness, to which we all object, but whenever we can, we add our own spin to the layers of complexities around us. And here is the crux of the point that I've been making. Information is not property. Property cannot be duplicated ad infinitim. Neither can digital information be duplicated ad infinitum. But what does that have to do with anything? Are you saying that only tangible objects can be stolen? Intellectual property certainly can be stolen. Your digital persona can be stolen. Are these not things that can be stolen? Information can, by its very nature. The concept of "theft" does not apply. The concept of restricting the flow of information is artificial (to answer someone else's question from earlier), whereas the laws of physics provide a natural restriction on the flow of goods. I'm not talking about information. I'm talking about thought processes committed to digital. Algorithms, code, art, words, pictures, music, and other forms of creativity that should have protection from the "flow of information" by people who don't want to pay for it. Also, you said: "Laws of Physics" provide a natural restriction on the flow of goods? That got a laugh out of me. Would you be so kind as to tell me what specific "Laws of Physics" pertain to the real world and not to the digital one? Would it surprise you that life it's self is digital? But, we're traveling into another topic to debate and I don't want to go there -- it's far more complex than this topic. You are the one buying into the "spin" by claiming that information is as permanently and inviolately restricted as atoms and molecules are. That is false. That does not make breaking the law "right", but it is a necessary fact of nature to understand if you want to understand the law and why the law exists (in theory). Well, you got me there! I'm clueless as to what the hell your talking about. Of course, the media moguls have spent decades selling that spin precisely because they want to confuse the issue. If you convince people that information is "property" in the same way that their house or car is, then you undermine the purpose of copyright (promoting social good, not private profit), undermine any attempts to reform the law, and undermine the basic precepts of both open source software (the free flow of information creates better expressive works through sharing) and Free software (restriction of the free flow of information is immoral). That's a mouthful, but totally wrong. Why shouldn't the media moguls protect their investment, after all it's their investment? You appear to expect everyone to provide you with information for free, is that it? Is murder "theft"? Of course not, but it's still illegal. Is rape "theft"? Of course not, but it's still illegal. Is arson "theft"? Of course not, but it's still illegal. Is jaywalking "theft"? Of course not, but it's still illegal. Is speeding "theft"? Of course not, but it's still illegal. Is copyright infringement "theft"? Of course not, but it's still illegal. Duh! Everyone of those example can be looked at as someone stealing something. Stealing life, stealing personal freedom, stealing use of processions, and so on. But, that's not at issue here. You have made this issue into is one of what the definition of infringement is. It is clearly the act of breaking the law by having in your procession, or for your use, something that you are not entitled. To me, that's stealing -- you call it what you want. My grandkids have learned that they should never get into a "No, you did." exchange because I can carry it on forever. However, considering that this topic is tangent to php copyright infringement/theft issue, I shall refrain from posting to this subject to the list again. If you want to take the discussion off-list, you're welcome. Larry, please understand that nothing that has been said in this exchange should be taken as a personal assault on you or your abilities -- you're simply expressing your opinion and I'm expressing mine. That's all. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating a text file
At 10:29 AM +0800 7/18/07, Ryan Lao wrote: i made a simple PHP form that would ask for the users complete name, a button that would browse to a file that the user wants to upload, a text area for additional comments, and a submit button. This form works just fine. what i want to achieve next is for my form to also create a text file when it is submitted. The text file will contain the users complete name, the filename that was being uploaded and the additional comments from the user. Can anyone give me some ideas on how to do this? If I was to do that, I would use MySQL. Store your data in a database -- much easier for me. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] about SQL authentication on PHP
Hello: I'm trying to connect to a SQL Server database with PHP using windows auth. To do that I modified the PHP.ini file changing the line above: ... ; Use NT authentication when connecting to the server mssql.secure_connection = Off ... putting mssql.secure_connection = On ... instead but when I tried to connect to SQL Server the function mssql_connect('myserver', '', '') doesn't work. What am I doing bad? need I to do something else? Help me please, waiting for your help, Richard Eduardo Ricardo Hernández Osorio Técnico Telecomunicaciones Aeronáuticas U.T.B Servicios Aeronáuticos, ECASA s.a. Aeropuerto Internacional "Frank País García" Tel: (53) (24) 474569 email: [EMAIL PROTECTED] "...de buenas intenciones está empedrado el camino al infierno..." -Mensaje original- De: Jeff Taylor [mailto:[EMAIL PROTECTED] Enviado el: Tuesday, March 20, 2007 4:43 AM Para: php-general@lists.php.net Asunto: [PHP] working with class inheritance Hey all, got a slight problem, where for some reasons my variables dont seem to be getting stored in the child class: e.g class Parent { $private type; public function __construct() { } public function GetType() { return $this->type; } } class Child implements Parent { $public function __construct() $this->type= 'Child'; } } $Child= new Child(); echo $Child->getType; Can u see any reason why the type would return null? Thanks, Jeff -- 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
[PHP] Re: If MySQL column/field values are in an PHP array
OK, $cen_fields is an array of a store's Name, City, and State concatenated. $cen_fields[0] echo'd looks like this: CHIEFS SUPERMARKET ST. MARYS OH $cen_fields[1] echo'd looks like this: CHIEFS SUPERMARKET CELINA OH $in_list is the concatenated store's Name, City, and State but formatted w/ commas for MySQL. i.e. >From > $in_list = "'".join("','",$cen_chiefs)."'"; $in_list echo'd looks like this: 'CHIEFS SUPERMARKET ST. MARYS OH','CHIEFS SUPERMARKET CELINA OH','CHIEFS SUPERMARKET COLDWATER OH','CHIEFS SUPERMARKET DELPHOS OH','CHIEFS SUPERMARKET DEFIANCE OH','CHIEFS SUPERMARKET BRYAN OH','CHIEFS SUPERMARKET WAUSEON OH','CHIEFS SUPERMARKET PAULDING OH','CHIEFS SUPERMARKET NAPOLEON OH' The central table looks like the following: (There's more columns but to be concise I added ones in question) ++-+--+ | strName| strCity | strState | ++--+--+ | VILLAGE STORE 14 FRESH | WEST PENESIO | PA | | VILLAGE STORE 19 FRESH | WEST PENESIO | PA | | CHIEFS SUPERMARKET | ST. MARYS | OH | ++---++ So user fills in form. Table is populated with form data, and if the store name, city, and state matches exactly to $in_list value it'll store form data in this particular table. With my current query, rows will be returned only if they match strName, strCity, strState exactly. In addition to that I want the query to return the rows where strName matches partial $in_list array value So if CHIEFS SUPERMARKET ST. MARYS OH is a value in $in_list If user only enters "CHIEFS" and not CHIEFS SUPERMARKET I want to be able to return that row also, even though it doesn't exactly match array value. I hope this is more clear. I tried the MySQL forums but they are kinda slow responding. // ""M. Sokolewicz"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >> I created an array using the following: >> >> $in_list = "'".join("','",$cen_chiefs)."'"; //$cen_chiefs is an array >> >> $query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,' >> ',strCity,' ',strState) IN({$in_list})"; >> >> How would I go about adding an AND clause to the above query to return >> all rows where strName column values are in $in_list array >> >> I acutally did the above w/ "SELECT * FROM central WHERE CONCAT(strName,' >> ',strCity,' ',strState) >> IN({$in_list}) AND (strName) IN({$in_list}) ORDER BY conName"; // This >> return zero rows. >> >> I think I Should I be using strName as a pattern, because strName would >> be a partial value of $in_list array values? >> >> Something like: REGEXP '^.$' >> >> "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) >> IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName"; >> //This query doesn't work by the way. This is where I'm stuck. > > First of all, let's start by saying that this question is very OT on a > php-list. It would be a lot more appropriate on a mysql list. But, I'll > try to help you anyway. First of all, I have no clue what you're trying to > do. Give some values (ie. what's in $cen_chiefs, what does the central > table look like, and what does strName look like. > > The whole problem here, afaics, is that you don't have a clear idea of > what you want. Tell us what you _want_ to do (not HOW, but what the result > should be) and we might be able to help. > > Now, > SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) > IN({$in_list}) AND (REGEXP '^strName$') IN({$in_list}) ORDER BY conName > won't work simply because you're saying (php-style): if($foo == $a.' '.$b > && $foo == $a), which obviously will _never_ work :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Pirate PHP books online?
> > The idea of even offering an electronic version should be to drive > > sales for the hard copy. Maybe offer a "Condensed Version" > > electronically, that has enough content that readers can get enough of > > a feel for the product to drive a buying decision. Throughout, make > > reference to the full version having more complete content, complete > > with an "order now" link. This method worked well for Readers Digest! > Or watermark the .pdf with something that uniquely identifies each copy > - this could be done with a script at the time of the order. Maybe the name of the > original buyer, or the order number, etc. > Doesn't prevent the piracy, but does give traceability should you wish to pursue the > pirate. Didn't/doesn't the PHP Architect magazine do this? Or am I mis-remembering? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] repetition of tedious references
At 2:24 PM +0200 7/18/07, Olav Mørkrid wrote: consider the following statement: $language = isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && $_SERVER["HTTP_ACCEPT_LANGUAGE"] != "" ? $_SERVER["HTTP_ACCEPT_LANGUAGE"] : "*"; when using strings in arrays that may be non-existing or empty, you have to repeat the reference *three* times, which gets excessive and unreadable. is there any way to only have to write $_SERVER["HTTP_ACCEPT_LANGUAGE"] only once? i know it's possible to supress "is not set" with @, but that just seems wrong in case there really is an error in the statement. i love php, but this is one of my pet peeves. Olav: Mine too. But, Rasmus gave me this: $action = isset($_GET['action']) ? $_GET['action'] : null; Which could be translated to: $language = isset ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) : "*"; I think that might help. Anyone see a problem with it? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] repetition of tedious references
On 7/19/07, tedd <[EMAIL PROTECTED]> wrote: At 2:24 PM +0200 7/18/07, Olav Mørkrid wrote: >consider the following statement: > >$language = >isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && >$_SERVER["HTTP_ACCEPT_LANGUAGE"] != "" ? >$_SERVER["HTTP_ACCEPT_LANGUAGE"] : "*"; > >when using strings in arrays that may be non-existing or empty, you >have to repeat the reference *three* times, which gets excessive and >unreadable. > >is there any way to only have to write >$_SERVER["HTTP_ACCEPT_LANGUAGE"] only once? > >i know it's possible to supress "is not set" with @, but that just >seems wrong in case there really is an error in the statement. > >i love php, but this is one of my pet peeves. Olav: Mine too. But, Rasmus gave me this: $action = isset($_GET['action']) ? $_GET['action'] : null; Which could be translated to: $language = isset ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) : "*"; I think that might help. Anyone see a problem with it? Cheers, tedd -- Yes,what if the key does exists, but is empty? Then it should fallback to the default value, which is exactly what the OP script did, and what yours does too when you add != "" statement, or empty(). Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_decode from session handler
On 7/19/07, Ryan Graciano <[EMAIL PROTECTED]> wrote: I'm having an issue getting session_decode to work from my session handler in PHP 5.2.3. Here's a short code snippet that demonstrates what I'm trying to do (from my read handler) - public function read($id) { var_dump($data); // prints out the serialized session correctly $retval = session_decode($data); var_dump($_SESSION); // prints out "array(0) {}" echo $retval; // prints false return $data; } In my calling function, $_SESSION is updated with everything that was held in $data, which means that $data was not corrupt - it worked when I returned it, but it did not work when I used session_decode. This is a problem because I want to change my read($id) function so that it decodes $data, adds something extra to the $_SESSION, then re-encodes $data and returns it. Thanks, - Ryan How did you get $data? If it's just serialized data, you can simply call unserialize instead of session_decode. Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] repetition of tedious references
On 7/19/07, tedd <[EMAIL PROTECTED]> wrote: At 2:24 PM +0200 7/18/07, Olav Mørkrid wrote: >consider the following statement: > >$language = >isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && >$_SERVER["HTTP_ACCEPT_LANGUAGE"] != "" ? >$_SERVER["HTTP_ACCEPT_LANGUAGE"] : "*"; > >when using strings in arrays that may be non-existing or empty, you >have to repeat the reference *three* times, which gets excessive and >unreadable. > >is there any way to only have to write >$_SERVER["HTTP_ACCEPT_LANGUAGE"] only once? > >i know it's possible to supress "is not set" with @, but that just >seems wrong in case there really is an error in the statement. > >i love php, but this is one of my pet peeves. Olav: Mine too. But, Rasmus gave me this: $action = isset($_GET['action']) ? $_GET['action'] : null; Which could be translated to: $language = isset ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) : "*"; I think that might help. Anyone see a problem with it? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Since you're responding to someone else asking about such things where there is the chance someone can just copy & paste... There really should be a whitelist against your actions. This has the benefits of making sure you know that your program is going to work as expected whether or not a user is trying to be malicious or they copied the URL incorrectly, etc. This: $action = isset($_GET['action']) ? $_GET['action'] : null; Becomes: $actions = array('one','two'); $action = (!empty($_GET['action']) AND in_array($_GET['action'], $actions)) ? $_GET['action'] : null; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] repetition of tedious references
From: tedd <[EMAIL PROTECTED]> Olav: Mine too. But, Rasmus gave me this: $action = isset($_GET['action']) ? $_GET['action'] : null; Which could be translated to: $language = isset ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) : "*"; I think that might help. Anyone see a problem with it? Cheers, tedd I see a problem. If it is set and == "", you let it stay "" instead of being assigned "*". Only when it is not "" should it be allowed to stay the same. _ Local listings, incredible imagery, and driving directions - all in one place! http://maps.live.com/?wip=69&FORM=MGAC01 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_decode from session handler
PHP passed $data to my write($id) function, and then I wrote it to the database. In the code below, I have retrieved it from the database. I presume that it used encode_session to generate $data. I tried calling unserialize() on it for good measure, but it wasn't able to parse the data. When I return $data from my method, though, PHP is able to turn it into a $_SESSION. Thanks, - Ryan - Original Message From: Tijnema <[EMAIL PROTECTED]> To: Ryan Graciano <[EMAIL PROTECTED]> Cc: php-general@lists.php.net Sent: Thursday, July 19, 2007 5:28:32 PM Subject: Re: [PHP] session_decode from session handler On 7/19/07, Ryan Graciano <[EMAIL PROTECTED]> wrote: > > I'm having an issue getting session_decode to work from my session handler in > PHP 5.2.3. Here's a short code snippet that demonstrates what I'm trying to > do (from my read handler) - > > public function read($id) { > > var_dump($data); // prints out the serialized session correctly > $retval = session_decode($data); > var_dump($_SESSION); // prints out "array(0) {}" > echo $retval; // prints false > return $data; > } > > In my calling function, $_SESSION is updated with everything that was held in > $data, which means that $data was not corrupt - it worked when I returned it, > but it did not work when I used session_decode. This is a problem because I > want to change my read($id) function so that it decodes $data, adds something > extra to the $_SESSION, then re-encodes $data and returns it. > > Thanks, > - Ryan How did you get $data? If it's just serialized data, you can simply call unserialize instead of session_decode. Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/
Re: [PHP] repetition of tedious references
At 5:41 PM -0400 7/19/07, Eric Butera wrote: On 7/19/07, tedd <[EMAIL PROTECTED]> wrote: But, Rasmus gave me this: $action = isset($_GET['action']) ? $_GET['action'] : null; Since you're responding to someone else asking about such things where there is the chance someone can just copy & paste... There really should be a whitelist against your actions. This has the benefits of making sure you know that your program is going to work as expected whether or not a user is trying to be malicious or they copied the URL incorrectly, etc. This: $action = isset($_GET['action']) ? $_GET['action'] : null; Becomes: $actions = array('one','two'); $action = (!empty($_GET['action']) AND in_array($_GET['action'], $actions)) ? $_GET['action'] : null; Eric: Point well taken about asking a question in a question -- I'll try not to next time. So, did Rasmus provide a problematic solution? tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] repetition of tedious references
tedd wrote: At 5:41 PM -0400 7/19/07, Eric Butera wrote: On 7/19/07, tedd <[EMAIL PROTECTED]> wrote: But, Rasmus gave me this: $action = isset($_GET['action']) ? $_GET['action'] : null; Since you're responding to someone else asking about such things where there is the chance someone can just copy & paste... There really should be a whitelist against your actions. This has the benefits of making sure you know that your program is going to work as expected whether or not a user is trying to be malicious or they copied the URL incorrectly, etc. This: $action = isset($_GET['action']) ? $_GET['action'] : null; Becomes: $actions = array('one','two'); $action = (!empty($_GET['action']) AND in_array($_GET['action'], $actions)) ? $_GET['action'] : null; Eric: Point well taken about asking a question in a question -- I'll try not to next time. So, did Rasmus provide a problematic solution? Yeh that works fine (with the additional checks that Eric suggested). But you're missing the point from the OP. He wanted to AVOID having to do something to the effect of: $var = null; if (isset($really_long_var_name_here)) { $var = $really_long_var_name_here; } else { $var = 'default_value'; } Where $really_long_var_name_here is listed multiple times. The function here: http://marc.info/?l=php-general&m=118476858504463&w=2 should do the trick but test for yourself. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] repetition of tedious references
Olav Mørkrid wrote: i didn't know about empty. thanks! do you have a link to this new php 6 ? : convention? I haven't seen any documentation yet but it currently operates like: ($a ?: $b) === (empty($a) ? $b : $a) with the exception that if $a is unset then an E_NOTICE error is raised. It remains to be seen in the final version whether that notice is raised or that this operator exists at all Arpad it would be great if php 6 could have a solution for this. php is sweet when it's compact! On 18/07/07, Arpad Ray <[EMAIL PROTECTED]> wrote: You can use empty() to take one of them out, since "0" is presumably also not a desired input: $language = empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? "*" : $_SERVER['HTTP_ACCEPT_LANGUAGE']; There's a new ?: operator in PHP 6 which will make that even shorter, however unlike empty(), it currently throws a notice with unset operands. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Save email as .eml file
I've been struggling with the same issue, does anyone have a link to or know of a way to automatically create eml files using PHP? The links that Google search returned were mostly specific to email clients, I need to create the eml files on the server. Thanks -- View this message in context: http://www.nabble.com/Save-email-as-.eml-file-tf4103444.html#a11701195 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: converting extended chars to plain ascii
On 7/19/07, ahlist <[EMAIL PROTECTED]> wrote: Hello, A libarary I'm using (the cybersource api if it helps any) is dying when I pass it "extended" chars - such as bjorn (two dots over the o - not sure of the actual name of this char -sorry). For some reason, the newest version of cybersourc's api aborts on this input. Can anyone recommend a quick way to strip/convert those chars out before I pass it to cybersources lib? I store the data as a varchar in mysql and pull it out in a query. Thanks for ANY advice. I need to get some sort of fix for this asap. I should add that I'm not using mbyte extension. Is there any transformation or regex that could replace anything outside of a-zA-z with another char. I don't need this to be exact. The db will still hold the original, correct chars. I just need to feed something to the cybersource lib that is all a-zA-Z Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Save email as .eml file
Hi there, Well it can be easily done. Just input your mail (make 'procmail' fwd it) to your script & script would save it as .eml . Try to use the following code for script : CODE # Hope this helps you out. Greetings Utsav Handa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating a text file
okay, i'll try that example you gave me... thanks! ""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 7/17/07, Ryan Lao <[EMAIL PROTECTED]> wrote: >> i made a simple PHP form that would ask for the users complete name, a >> button that would browse to a file that the user wants to upload, a text >> area for additional comments, and a submit button. This form works just >> fine. what i want to achieve next is for my form to also create a text >> file >> when it is submitted. The text file will contain the users complete name, >> the filename that was being uploaded and the additional comments from the >> user. Can anyone give me some ideas on how to do this? >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > >Ryan, > >Are you trying to create individual files for each form > submission, or one file that will be appended with new data upon > submission? > > -- > Daniel P. Brown > [office] (570-) 587-7080 Ext. 272 > [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php