Posts Tagged PHP
Getting started with Laravel (Part 1)
I’ve been itching to learn a new language or new “something” for ages, normally client work gets in the way and I end up focussing on that. I’ve been fortunate enough to come off the end of a group of projects in recent days and due to the impending arrival of child number 2 haven’t taken any new ones on, perfect timing for tinkering.
Gravity Forms: Submission Timestamp
We recently purchased Gravity Forms for doing some client projects and it’s fantastic… I thought I’d got everything I need but there was one thing it didn’t do that really surprised me, in the notification emails there was no way of getting the exact time the submission button was hit! This really surprised me, this seems like one of the most obvious things you’d want to know. Support were fantastic and answered my query in just a few minutes, it has to be done with a hook (this still surprises me!), so here you go: First create a hidden field in your form, we’ll use a hook to fill this in after submission. Add the following to your functions.php function… Continue reading »
Backup, backup and backup!!
A word to the wise, always make backups….. Particularly when you are testing a script that has the ability to delete emails!!!!!!! I was writing a script to delete some of my emails whilst I’m away, regular newsletters, advertising from holiday companies, you know the sort of stuff I’m talking about? Not spam, and not stuff I want to unsubscribe from – just stuff – stuff that I’ll only delete when I get home anyway. Anyway, I screwed it up and an empty variable got passed into the cleanup script and has blown away my entire inbox. Luckily it’s my more spammy account that I signup to most things with, however I’m quite good at pruning it normally and it… Continue reading »
Ajax Crawling with PHP and Curl?
I apologise now if I put off some of the more general readers with this post, but I’ve struck upon a bit a problem! I have some automated code that I wrote using PHP and Curl, that retrieves a mountain of information from a website, does some statistical analysis on it and then presents me with a nice little report (having inserted the data into a MySQL database). It’s wonderful – to do the process manually would take maybe 2-3 hours every day, as it is I wake up to a nice report sat in my inbox everyday with all the information in it. Now I have a problem, the website that I crawl to get this information is converting… Continue reading »
Automation – Making your life Easier, 600 steps at a time!
Those that know me, know that I’m a programmer (amongst other things!), and I love automation, I have this vast frustration when people are repeating the same manual steps hundreds and hundreds of times. Bloggers tend to “get” the whole process of automation, they’re used to having plugins that go away and do all their bidding for them, eBayers have started getting into this with bid sniping tools that bid frantically in the dying seconds of their auction. I’ve done a couple of pieces of work over the years automating fetching content from websites and displaying it in a different format or fetching it and providing a large amount of mathematical calculations, recently these jobs have centred around gamblings sites… Continue reading »
Outsourcing – is it bad when you have a little Knowledge?
I’ve just posted a job online with RentACoder for a domain name I’ve had sitting around for the last couple of years. I have the content (two affiliate feeds) and want someone to design a website with a backend facility that allows me to import them (and update the content when the feed changes), not rocket science – probably one to two days work if I had time. The problem is I don’t have time at the minute! But ultimately it comes down to what are two days of my time really worth I guess. I hadn’t really considered it until the bids started coming in…. The first one was $200, I’d probably accept that to get the site done… Continue reading »
Are magic quotes on?
One way to check if magic_quotes is running is to run get_magic_quotes_gpc(). It will return a 1 if it is on, or a 0 if it is off. You can use this result to print out the magic_quotes status, or to decided if you should run another function, such as addslashes. Read more at http://www.psychicperformer.com < ?php if (get_magic_quotes_gpc()==1) { Print “Magic Quotes gpc is turned on” ; } else { Print “Magic Quotes gpc is turned off” ; } ?>