Re: [PHP] $$var
If $a = 'foo' and $$a = nothing (i.e. no value assigned to $foo) you will get an error if you tried to use this to do something else. On Sun, Mar 6, 2011 at 3:21 PM, tedd wrote: > At 6:42 PM +0530 3/6/11, Ashim Kapoor wrote: > >> Dear All, >> >> I was reading the php manual for session_register, and I found the >> following >> line there : - >> >> >> $_SESSION[$var] = $$var; >> >> Why do I need $$ there ? Can someone explain? >> >> Thank you, >> Ashim >> > > Ashim: > > You don't need to user session_register(). > > Cheers, > > tedd > > > -- > --- > http://sperling.com/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] New to list and to PHP
better yet: http://lmgtfy.com/?q=explanation+of+classes+in+php On Sun, Feb 20, 2011 at 9:39 PM, Tamara Temple wrote: > > On Feb 20, 2011, at 7:38 PM, tolga wrote: > > 21.02.2011 03:21, Tamara Temple yazmış: >> >>> >>> On Feb 20, 2011, at 5:51 PM, tolga wrote: >>> i'm interested in php about 3 maybe 4 years but i still couldnt get the logic of classes. it makes no sense to me. i couldnt understand whats about classes good at or how to use or write it. and i can say that " is 'class' really necessery? " >>> >>> a class is construct of Object Oriented PHP. If you don't understand >>> object oriented programming, you'll likely not understand the use of object >>> and classes in PHP, either. There are good reasons to use object oriented >>> principles in PHP and other langages, and good reasons to use procedural >>> principles in PHP as well. Learning when to use either is important. >>> Learning how to use classes someone else implements is also important to >>> keep from re-re-re-re-re-reinventing the wheel. >>> >>> >>> thanks. are there any high detailed explanation of classes in php? >> except for php.net, cuz i didnt understand anything from there about >> classes. >> > > seriously: http://lmgtfy.com/?q=php+object+oriented+programming+tutorial > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] iVery payment integration help
Here you go: http://lmgtfy.com/?q=how+to+integrate+the+iVeri+payment+gateway+in+a+wordpress+site On Wed, Feb 16, 2011 at 4:27 PM, Michael Simiyu wrote: > hello, > > i need some quick help integrating the iVery payment gateway in a > wordpress site > > thanks > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] Howdy (new in here)
@tedd I was interested about the reasons why people perceive php as a poor language. I came across the following stackoverflow thread: http://stackoverflow.com/questions/309300/defend-php-convince-me-it-isnt-horrible The guy answering him immediately after brought up some very good rebuttals, however, there are some really fundamental things that people have come to expect from programming languages that php doesn't offer and this is probably why people have issues with it. Two in particular, that people might have issues with, were brought up: 1. method/function name insensitivity 2. inconsistent naming of built in and library functions However, since this is an open-source project behind some of the biggest internet based businesses, I am personally quite fond of it. I have no issues with the language as the above two points can easily be countered with a good IDE or a little experience. Finally, I would like to say, if you are going to look for it, you can find faults with any and all programming languages. It comes down to preference, that is why you have people in the industry coding things with Java instead of C++, or vice versa, even though the other might be better for the application. On Tue, Feb 15, 2011 at 4:08 PM, Steve Staples wrote: > On Tue, 2011-02-15 at 15:54 -0500, tedd wrote: > > At 2:20 PM -0500 2/15/11, Mujtaba Arshad wrote: > > >I would say all languages have their 'lousy developers', however, since > very > > >few schools focus on teaching the 'proper coding style' for PHP it leads > to > > >people learning from a variety of resources available online, and this > leads > > >to them receiving mixed messages from the tutorials and allowing people > the > > >ability to choose the method they prefer. Since there is very little > > >syntactic consistency among the code produced by developers, it leads to > the > > >perception that the developers are 'lousy'. > > > > I don't know if I buy that or not -- I didn't learn programming in > school. > > > > I learned by using rocks instead of ones. It was a few years later > > that we created the concept of using the absence of rocks as zeros > > and were finally able to build things other than pyramids. > > > > Style became a matter of choice -- it's what makes sense to you and > > that usually works. > > > > For example, while it's true that Rob and I disagree on brace style, > > there are many different types to choose from. > > > > This is what I show my students: > > > > http://rebel.lcc.edu/sperlt/citw229/brace-styles.php > > > > Cheers, > > > > tedd > > > > -- > > --- > > http://sperling.com/ > > > > Tedd: > > Your bracing style is WRONG. Whitesmiths Style sucks... and Allman > Style is the best way to do it. > > :) > > > My personal bracing style is the Allman Style... I've been doing it that > way forever, it just made sense to me (even before I knew there was that > style name... which was about 3 minutes ago). everything lined up nice > and neat. > > Steve > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] Howdy (new in here)
I would say all languages have their 'lousy developers', however, since very few schools focus on teaching the 'proper coding style' for PHP it leads to people learning from a variety of resources available online, and this leads to them receiving mixed messages from the tutorials and allowing people the ability to choose the method they prefer. Since there is very little syntactic consistency among the code produced by developers, it leads to the perception that the developers are 'lousy'. On Tue, Feb 15, 2011 at 2:03 PM, Brian Waters wrote: > On Tue, Feb 15, 2011 at 12:52 PM, tedd wrote: > > At 11:37 AM -0600 2/15/11, Nicholas Kell wrote: > >> > >> On Feb 15, 2011, at 10:51 AM, tedd wrote: > >> > At 8:26 PM -0500 2/14/11, Brian Waters wrote: > >> >> (if that's OK). I know that PHP sometimes has a reputation for > having > >> >> (some) lousy developers, and I'd like to avoid becoming one of those > >> > > >> > We don't agree that PHP has a reputation of having some lousy > >> developers -- because that's simply not true. > >> > >> Humm I seem to agree with the OP. But, that being said, unlike most > >> language fanboys PHP'ers usually fully admit it. > > > > > > I guess that we run in different worlds. Most of the PHP programmers I > know > > are very good. > > I didn't mean to suggest anything. Nor do I necessarily subscribe to > the idea (that PHP has some lousy developers). It's just something > I've heard bouncing around - probably on those noisy internet forums. > > - BW > > P.S: > > On Tue, Feb 15, 2011 at 11:51 AM, tedd wrote: > > PS: We seldom point out spelling errors, but it's good to review what you > > post. Remember, what you post will be public for generations to come. > > I'm aware that I misspelled "viciously" in my original post but was > too lazy to rectify the situation. > > P.P.S, Apologies for backchanneling tedd there; I'm used to mailing > lists with a default Reply-To: t...@mailinglist.com header. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] curl_exec won't return (any data)
nice quintuple posting. On Tue, Feb 8, 2011 at 9:46 AM, Tolas Anon wrote: > the one thing i can think of is that curl_exec() somehow stops > listening for results and hangs the calling php script > (php_daemon_script in this case) if it does not receive any data for > more than a few minutes (converting the 60mb vid file takes about a > minute, and the 2gb script well over 30 minutes).. > > however i haven't been able to find any bugreports via google that > describe this bug.. > > could it be i found a new bug in libcurl?... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] "public static" or "static public"?
I suppose it comes down to preference of the programmer, since there is no standardized rule for it, people adapt it as they find it convenient at the time. On Mon, Jan 31, 2011 at 1:52 PM, David Harkness wrote: > On Mon, Jan 31, 2011 at 3:51 AM, Richard Quadling >wrote: > > > I've just done a quick scan of all my methods ... > > > > I just did the same scan on my code, and the clear majority was > >private abstract final function > > YMMV > > David > -- Mujtaba
Re: [PHP] "public static" or "static public"?
Having learned java before even knowing what php was (yeah I'm a noob in both) I prefer scope static function. On Fri, Jan 28, 2011 at 12:20 PM, Fernando wrote: > I personally like scope static fucntion. Coming from C# it just makes more > sense to me. > > JF. > > > On 28/01/2011 12:15, Colin Guthrie wrote: > >> OK, so it's a Friday hence a random debate >> >> >> What is preferred for class methods? >> >> class foo >> { >> static public function bar(){} >> >> public static function wibble(){} >> } >> >> ?? >> >> All methods are valid, but are some more valid than others? :p >> >> Checking ZF: >> >> [colin@jimmy Zend (working)]$ cgrep "public static function" . |wc -l >> 755 >> [colin@jimmy Zend (working)]$ cgrep "static public function" . |wc -l >> 60 >> >> It's clear which is preferred there, but still not absolutely consistent >> (I didn't bother checking differently scoped methods). >> >> >> I personally prefer scope first then "static", but others may have valid >> reasons/arguments for preferring the other way. >> >> WDYT? >> >> Col >> >> >> >> -- Mujtaba
Re: [PHP] switch case madness
$t_mssg = 0 is different from $t_mssg = "0" (in all languages, as far as I know, maybe not in python, but I don't know python) On Tue, Jan 18, 2011 at 10:30 PM, Donovan Brooke wrote: > Hello, > > I must not understand PHP's switch/case.. > The case '0' below fires when $t_mssg = "" apparently. > Is this how it's suppose to work? I would think > it would only fire if it equaled "0". > > -- > print "-$t_mssg- "; > > if (isset($t_mssg)) { > switch ($t_mssg) { >case 0: > echo 'Log In Successful'; > break; > } > } > -- > > TIA, > Donovan > > -- > D Brooke > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] which php file is sending emails?
Nilesh's note to self: don't sound condescending when suggesting untested code. On Sun, Jan 16, 2011 at 10:56 AM, Marc Guay wrote: > > There can be nothing more simpler than this!!! > > I thought that this quote needed some revisiting. > > Marc > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
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 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 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] Newbie Question
everyone I know who uses dreamweaver does so because the people that are supervising the project want to use dreamweaver, otherwise I haven't found anyone who actually liked using it. So I don't know if that actually means anything but that's the way it is. I guess it would be important to remember that as long as you clearly understand what you are doing it hardly matters whether you use notepad or something much more sophisticated, which also completes a bunch of tasks for you. I just went back and read the original post and realized the recent discussion has nothing to do with it. Awesome. On Mon, Jan 3, 2011 at 9:50 AM, Tim Thorburn wrote: > On 1/2/2011 5:56 PM, Adolfo Olivera wrote: > >> Thanks for the replies. I'll just put a php on all my html containing php. >> A little of topic. Wich IDE are you guys using. I'm sort of in a catch >> twenty two here. I been alternating vim and dreamweaver. I'm trying to go >> 100% open source, but I really find dreamweaver easier to use so far. >> > While I may get shot for saying this - I wouldn't worry too much about > being "100% open source". Use whatever gets the job done, period. If > you're more comfortable with Dreamweaver, stick with Dreamweaver. In my > day-to-day work I'll end up using a combination of Dreamweaver, Eclipse, and > Notepad++, along with a little Pico/Nano to do quick edits on the server. I > know a few people who swear by NetBeans, though I haven't felt the need to > try yet another editor just now. I tend to prefer an editor that has code > completion - sometimes makes for less typo mistakes and such, but that's > just a personal preference, non-code completion is just as fine. > > Now, onto the real debate - editor color scheme and font choices! (Don't > reply, I know better ... I just had to >.>) > > -- Mujtaba
Re: [PHP] Re: Do you trim() usernames and passwords?
Won't there also be a higher chance of getting your username/password combination stolen if you are keylogged, if you are typing in your passwords all day everyday? Obviously, the people on this list will say "I don't get keylogged, cause I am that pro" but whatever, just don't force people to enter passwords, no one appreciates it. On Fri, Dec 31, 2010 at 1:26 AM, Tamara Temple wrote: > > On Dec 28, 2010, at 2:11 PM, Joshua Kehn wrote: > > Specifically: >> >> Dotan Cohen wrote: > I seem to have an issue with users who copy-paste their usernames and > passwords coping and pasting leading and trailing space characters. > >> Users should not be copy-pasting passwords or usernames. Do not compromise >> a system to cater to bad [stupid, ignorant, you pick] users. If this is an >> issue then educate the users. >> > > I'm sorry, but this is just bloody stupid. I keep my usernames and randomly > generated, very long passwords in a password keeper. If you're not going to > let me copy paste them into a web page, i'm just not going to ever use your > application. Copy/pasting is something that happens on the *local* machine > -- it never goes out to the net. By forcing people to type in their user > names and passwords you are going to cause them to enter easily-remembered, > and typically easily-crackable combinations. What is the possible logic for > disallowing someone to paste in their usernames/passwords??? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] Re: Do you trim() usernames and passwords?
craphound.com/images/xkcdwrongoninternet.jpg Perfect way to describe how the members on this list are behaving right now. On Wed, Dec 29, 2010 at 8:17 PM, Omega -1911 <1911...@gmail.com> wrote: > < I see you Waving your pom poms...> > I guess it was ok for Dani to say " I'm just > not sure if it's pronounced with a "J" or an "H" sound. I mean, > Arthur's name is easy enough, but I honestly am confused by Javen's > (except when he spells it out like James Vencent)." > > First, that is assuming a lot... on Dani part. Second, don't dwell on > Dani's words, PROVE ME WRONG ON WHAT DANI COMMENTED IN HIS FIRST REPLY > TO THIS THREAD. > Thanks and now, back to the cheerleader section you go.. > > On Wed, Dec 29, 2010 at 8:05 PM, Nicholas Kell > wrote: > > > > On Dec 29, 2010, at 6:37 PM, Omega -1911 wrote: > > > >> I know something funnier... Let's wait for Dani's response. > >> > >> On Wed, Dec 29, 2010 at 7:28 PM, Bastien wrote: > >>> > >>> > >>> On 2010-12-29, at 5:32 PM, "Daniel P. Brown" < > daniel.br...@parasane.net> wrote: > >>> > On Wed, Dec 29, 2010 at 15:16, Omega -1911 <1911...@gmail.com> wrote: > > Sound silly? Why Daniel? It's all documented and public knowledge. > What I > > thought was silly was a entire thread about which ASCII combination > was > > best.. convert to a higher range above the 255 character range... > > > > There is NOTHING I have mentioned that you or anyone can call a lie. > Google > > or eccouncil.org are great resources. You forte is php... what > security > > certs doyou hold that contradict my previous email? > > Aside from involvement with the now-defunct Federal agency, the > National Infrastructure Protection Center, training by the FBI's > Regional Computer Forensic Laboratories, accreditation as the first > private-sector mobile computer forensic investigation laboratory in > the tri-state area, multiple computer security certifications, and > about fourteen years of professional network and computer security > service to multiple public and private sector entities, I suppose not > much. > > > > > > > > Even funnier yet - bottom post like you were asked. And to really bust > your gut, this thread has gone on far too long off topic. > > > > I believe that the person you are referring to as Dani, is in fact > Daniel. I don't, nor would I ever start to call you Omeggie just to get > under your skin. > > > > Use your prestigious fraternity flaunting email and message Daniel > directly to continue arguing. > > > > I'm not trying to be rude, but I do believe it is in the best interest of > the list to kill this thread. Dotan, please chime in if your problem hasn't > been solved. I will, as I am sure the rest of the list will be happy to help > if it hasn't. > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba
Re: [PHP] Re: Do you trim() usernames and passwords?
Quote: I was pleased earlier, however, to learn about your interest in helping others by creating a venue for them to sell their own homemade pornographic DVDs at such a low price, but then disappointed to learn that your grasp of Perl and site management wasn't yet up to par. Lol what. On Wed, Dec 29, 2010 at 6:20 PM, Omega -1911 <1911...@gmail.com> wrote: > AHHH... Searching by by an email is REALLY what you call hacking? Oh > wait, you said that with all your knowledge in forensics you can find > people all over the world. Thank God for Go0GlE. > > > (remoteclerk.com) c-174-59-179-206.hsd1.pa.comcast.net - - > [29/Dec/2010:10:19:50 -0800] "GET /quick_calendar.php HTTP/1.1" 302 > 227 " > http://webcache.googleusercontent.com/search?q=cache:a6QITlCqzRUJ:www.remoteclerk.com/content/privacy.php+%221911que%40gmail.com%22&cd=6&hl=en&ct=clnk&gl=us > " > "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, > like Gecko) Chrome/8.0.552.224 Safari/534.10" > > On Wed, Dec 29, 2010 at 5:32 PM, Daniel P. Brown > wrote: > > On Wed, Dec 29, 2010 at 15:16, Omega -1911 <1911...@gmail.com> wrote: > >> Sound silly? Why Daniel? It's all documented and public knowledge. What > I > >> thought was silly was a entire thread about which ASCII combination was > >> best.. convert to a higher range above the 255 character range... > >> > >> There is NOTHING I have mentioned that you or anyone can call a lie. > Google > >> or eccouncil.org are great resources. You forte is php... what security > >> certs doyou hold that contradict my previous email? > > > >Aside from involvement with the now-defunct Federal agency, the > > National Infrastructure Protection Center, training by the FBI's > > Regional Computer Forensic Laboratories, accreditation as the first > > private-sector mobile computer forensic investigation laboratory in > > the tri-state area, multiple computer security certifications, and > > about fourteen years of professional network and computer security > > service to multiple public and private sector entities, I suppose not > > much. > > > >I was pleased earlier, however, to learn about your interest in > > helping others by creating a venue for them to sell their own homemade > > pornographic DVDs at such a low price, but then disappointed to learn > > that your grasp of Perl and site management wasn't yet up to par. > > "Hacking" didn't work out all that well over the last couple of years > > either, but you could probably go, what, just a thousand feet or so to > > hire one of the kids from Ben Davis high school to help out. Pay them > > a fair wage, though I mean, with your home last appraised at > > $122,100 (on the 27th of July, 2007, so you might want to see if it's > > appreciated more in value by now), we know you can afford to pay > > better than minimum. Heck, if they'd pave your street as well as your > > driveway is sealed, that alone might help improve the value, at least > > a little bit. Which would be fine --- I mean, you already get the > > benefits of better insurance, consider how close you are to that fire > > hydrant. (You know the one I mean, that little bluish-green one when > > you turn right out of your driveway and cross the street.) > > > >Speaking of blue-green, I love that picture of Javen. Was that > > done right on his iPhone, or did he do it on the computer before > > uploading it? Pretty cool either way, just like his name. I'm just > > not sure if it's pronounced with a "J" or an "H" sound. I mean, > > Arthur's name is easy enough, but I honestly am confused by Javen's > > (except when he spells it out like James Vencent). It's no surprise > > that he's an intelligent kid, though, being born at the autumnal > > equinox and all (and even before sunrise that morning). > > > >That aside, you might be right. Perhaps my qualifications don't > > quite justify my opinion in contradicting anything you have to say. I > > mean, being contracted to trace people all over the world can > > sometimes be almost as fun as knowing what tools to use to find out > > who they are in the first place. Still, one shouldn't spend so much > > time doing just one thing, which is why we both enjoy programming. > > > >Regardless, it doesn't matter, and I see no reason to get into any > > kind of flame war --- especially with one of the famous Six Hounds > > from the Darkside of Hell. Anyway, sorry for being ten days late, but > > happy birthday, Chap. It was good getting to know you. And, as the > > Ques know, "friendship is essential to the soul." > > > > -- > > > > Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting > > (866-) 725-4321 > > http://www.parasane.net/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mujtaba