redbullmarky
Staff Alumni-
Posts
2,863 -
Joined
-
Last visited
Never
Everything posted by redbullmarky
-
you could generate a MD5 hash and store it in a session, and also in a hidden input field. when the form is posted, simply check this hidden hash against the one in the session var, and only accept the input if there's a match. the hash would be generated each time just before the form is displayed.
-
you won't have to. PHP5 is probably 99.9% backward compatible with PHP4. I moved to a PHP5 server taking about 5 sites and approx 10 staging environments with it, taking only about 30 mins to 'tweak' the lot, and mostly were changing php.ini settings to how I like them where they differ from defaults. It'll take you much less time to upgrade the server than it will to backport. And if the code is already working with PHP4, where's the issue?
-
Why is PHP an amateur/hobby/non-enterprise ?
redbullmarky replied to chantown's topic in Miscellaneous
bilis - if it pays your bills, then who cares if someone else doesnt see that and thinks PHP is "amateur"? Azu - your response is a bit off key considering a) the OP's question is neither offensive or b) is actually a reasonable question and has alot of truth - PHP IS the weapon of choice for hobbyists/amateurs, no two ways about it. Calling someone an idiot for having an opinion or raising a topic actually comes back right at both of you. I don't think the topic at hand is trying to provoke , and I won't (and pretty sure none of the other mods/admins will either) be handing out any warnings at all. PHP is a great language for starters, but equally great to continue in your career if you choose to churn out some pretty top notch apps. Yahoo, wikipedia, etc, are just proof of what can be achieved. We're all in this game ultimately to make money and to make a living, so consider this: With the XBox360, PS3, PC, etc all churning out some great looking games, all initially coded in C++ or whatever low level "enterprise" languages, why is it that some of the best and most addictive games are either written in Flash or are ran through a Spectrum (or other retro system) emulator???? My point? It doesn't matter what your choice is - nobody is going to shy away from your great idea just because it's not written in an free/cheap/expensive language. Best thing to do - get on with your job, enjoy what you do, and quit bitching about what is best or not. -
Hai...doubt regarding printing php errors
redbullmarky replied to leela's topic in PHPFreaks.com Website Feedback
a) posted in the wrong place b) please do not ask for people to write your code for you. if you're prepared to pay, post a topic in the Freelancers area of the forum - else there are plenty of resources on this site and around the internet to get you started, then we can help you if you get stuck. c) in any event, please explain your issue/question much more clearly. topic locked. -
Why is PHP an amateur/hobby/non-enterprise ?
redbullmarky replied to chantown's topic in Miscellaneous
this question kinda gets asked so many times and there are so many counter arguments, alternative examples, etc. All I tell myself - if it's good for Yahoo, Wikipedia, Facebook and otherwise pretty much most of the Top 10 or so popular sites in the world, it's good enough for me. It's not a requirement for popular or powerful software to be overly complex, ridiculously expensive and far out of reach from the masses. -
why hope? having a high post count doesn't put you in a better position, but rather the quality of the posts. if most of your posts are regarding how to get more stars, then you're wasting your time. it's not McDonalds.
-
have you tried reading the manual? there's tonnes of docs, examples, code snippets, etc for exactly what you're trying to do.
-
[quote author=emehrkay link=topic=106377.msg690987#msg690987 date=1189196208] Eh = A [/quote] i didnt get this bit :) :D
-
i sort of agree about rolling your own. however - and this is no reflection on tj71587 - but the original question "which is the best" would imply not enough practical experience with existing CMS's. Once you've played with a few, which you'd ideally need to before you can understand them properly to write your own, then you'd be able to answer that question (or give a good opinion) yourself. give some a go here: http://www.opensourcecms.com/ - i'd recommend staying well away from drupal to start with as it comes with a hefty learning curve for people new to CMS's. CMS Made Simple as I suggested will a) be good to learn the basics and b) more than enough for simple sites.
-
have a look at the source for CakePHP's Inflector class. They have methods that will handle this in both directions, including irregularities like this one, and maybe a good start to getting ideas of how it's done.
-
CMS Made Simple. Easy to use/skin/expand but nice and useful straight out of the box. http://www.cmsmadesimple.org/ (a nod to AndyB for that one )
-
in short, it's not far short of awful. huge images, marquees, etc - it looks more like a myspace page than a site. seriously dude - just because it's your first site, doesnt mean you shouldnt put some serious thought and research into your site first to find out what you like, what looks good, etc before you start. if you're going to push "high quality" ringtones and wallpapers, you really need to back it up with a high quality site. strip it down to the bare basics, if anything. find some sites you like for reference purpose, and try and figure out "why" they're nice and why you like them. so congrats for getting your first site out the way, and good luck for your second version, but you need to do more homework first.
-
__get and __set (as well as __call) will work, but you need to use the overload() function before you instantiate the class. When i've used it in the past, I've just thrown it at the bottom of the class file so it gets called by default - so if my class is called - erm - MyClass, then just: <?php class MyClass { ... code ... } overload('MyClass'); ?> will do the trick. there's an example here
-
my naming conventions are like this for the same reason ToonMariner suggested - autoload. I have a 'libs' directory, typical files like: class.mysql.php - class called 'mysql' base.component.php - class called 'component' but generally a base/abstract class rather than one that should be used alone. funcs.general.php - general functions funcs.math.php - just as it says. it generally just means shaving time off actually finding stuff as well as allowing more automation when including relevent files.
-
Has anyone else gone through the "coding perfectalization" stage
redbullmarky replied to emehrkay's topic in Miscellaneous
you do need to be very careful. just like music, art and other 'creative' areas, if you don't keep going or try and overcomplicate stuff, you'll end up with "writers block" - where even the simple stuff is hard. i'd probably suggest moving on to something else, even unrelated to anything you have, and just do it. i like to take at least an hour out of my day to "play" with things - ie, writing silly little things to make a picture into a polaroid, etc. -
Has anyone else gone through the "coding perfectalization" stage
redbullmarky replied to emehrkay's topic in Miscellaneous
Hehe this 'syndrome' does sound familiar. I think as well as making it perfect, it can boil down to trying to stretch yourself so as to not get bored doing the same old stuff as before. Here's a good read from quite a while back, pretty much explaining many of the little mental blocks and issues we put up with: http://www.phpfreaks.com/forums/index.php/topic,115416.0.html -
I know this is a help forum, but in this case, you'd be better goingr sells the to PC World or Maplin or wherevese things and asking the sales staff. If not, i'm sure they'll point you to one that DOES work. Actually, you're UK based - so nip along to Comet instead. They do 2 for 1 on IT Works stuff - we got a couple of IT Works laptop webcams and they work fine with vista and the quality isn't so bad either - they also have a build in Mic.
-
The whole point of Zend Encoder is to encode scripts in this way to protect them from being modified or ripped off. Zend Optimiser will only decode it to the point where the server can run the script, not so that you can see it. The licence/system requirements, or whatever, before you downloaded it would/should have explained that the file was encoded.
-
firefox and vista (if that's what you're using) seem to be causing issues for me in this respect. Mostly after visiting HTTPS pages. IE has in the past seem to do weird things with its cache, including empty pages - so worth trying to clean up that. If you're not running IE7, then upgrade and make sure your Windows is up to date, too. Try resetting its settings back to default and starting from scratch. Basically - clean up your computer a bit and see if that helps.
-
Best place to meet a girl who is also into PHP? RATED R
redbullmarky replied to tibberous's topic in Miscellaneous
haha thanks, but i feel it'd be wrong to continue(). *shit*... -
Best place to meet a girl who is also into PHP? RATED R
redbullmarky replied to tibberous's topic in Miscellaneous
roopurt, i think the function you're looking for is 'explode'. "I want you to 'explode()' all over me, then you can fsock() off and die(), we cannot function() together as you're not in my class()" *sigh* i'll stop now.... -
first off, i'd recommend (not just to you, but to everyone here) to seriously avoid the @ suppressor. If you have an error, the suppressor will hide it from you, making debugging 100x harder. So on the 5 lines that use it - remove it, run the script again, and post any errors you get here. this has nothing to do with OOP either so moving to PHP Help...
-
[SOLVED] can anyone help on this function please
redbullmarky replied to watthehell's topic in PHP Coding Help
a) nothing to do with OOP (moved) b) you have enough here for the manual to be of assistance. http://www.php.net/move_uploaded_file c) you havent said if anything is wrong or if you got any errors d) in answer to your question "Is this ok?" then the answer is simple: if it works, yes it's ok. if it doesnt work, no it's not. Please explain yourself much more clearly giving all the information/errors/issues you have. -
source - using statements like your last one around these parts is not on - especially over something so trivial as someone else having an opinion/different spin on things. and hammering someone who has asked for help just because of their slightly incorrect choice of words. keep a lid on it, please - if you're going to point out the fact that an exploit isn't trivial, then "learn wtf youre on about" is less favourable to explaining exactly what the link between injecting a marquee and XSS attacks.