preload

Autoloading classes

Posted on: Dec 06, 2012 By: Alan Bruce | 0 Comments
If you’ve done any object oriented programming in PHP, then you are used to creating class files and having to include them in your webpages. There are a couple of ways you can do this. You could include them all in a header file common to all your pages, but if you’ve got a lot of classes, then you may be pulling in a lot of unnecessary code. Alternately, you could just include the class files that you need on each page – but then it becomes a matter of maintenance if you reference a new class on a page, then have to ... Read More

Sanitizing your data

Posted on: Nov 01, 2012 By: Alan Bruce | 0 Comments
If you do any PHP programming that includes writing data to or reading data from a database, then it’s important to keep an eye on how you are entering data into your database; you don’t know what your users intentions are, and while most of them just want to use your site as intended, some users could have more malicious intentions. You shouldn’t enter data directly as the user enters it, for a couple of reasons. 1) SQL injection attacks One of the more common types of attack. If the user enters SQL code into a field, that ... Read More

Preventing CSRF with a session variable

Posted on: Jun 20, 2012 By: Evan Rawson | 0 Comments
Cross Site Request Forgery (CSRF) is a growing concern for web developers as more and more viruses and malicious scripts are created in an attempt to surpass web based authentication systems. If you don’t know what CSRF is, it is a way of performing a kind of session hijacking, where a malicious pre-defined page request is sent from the user’s computer to a website that they are already logged into. This is able to bypass any server side authentication because the web server views this request as coming from the user, and therefore is a ... Read More

Tips for recognizing unexpected behavior in FileMaker’s PHP API

Posted on: Mar 21, 2012 By: Evan Rawson | 0 Comments
Recently, I’ve been working on a project that takes an existing FileMaker database, and adds a custom PHP front-end for access via the web. Fortunately, FileMaker offers a light-weight, easy to use PHP API. Having never worked with the FileMaker API, I found that it was extremely easy to pick up and use, but sometimes behaved in ways that a person with experience using various SQL drivers might not expect. Today I’m going to share a few of the problems that I came across, and how I was able to solve them.   Querying layouts, what ... Read More

Adding Autocomplete to your searches

Posted on: Feb 22, 2012 By: Alan Bruce | 0 Comments
Autocomplete is a feature that’s been around for a while. We’ve seen this in sites like Amazon, Google and Youtube – try entering the letters ‘st’ in Amazon’s search field, and you’ll get a list of suggestions including Star Wars, Steve Jobs,  Star Trek, etc. It’s a pretty cool addition to a search page, and it turns out that it’s not terribly difficult to do – there are prebuilt Javascript libraries that allow you to do it. I mentioned JQuery in a previous post, so that’s what ... Read More

Sending an HTTP Request in PHP without cURL

Posted on: Feb 03, 2012 By: Evan Rawson | 0 Comments
Most people who want to send page requests from PHP use the cURL library, but making sure that the cURL library is installed on the server is not always possible. You don’t need cURL to make a page request, in fact, in some cases it is just easier to use the built in functionality of PHP. The following code is an example of a very simple page with a single text input and a PHP script that generates a valid HTTP request, sends it to the URL that the user entered, and reads the HTTP standard response code generated by the server that handled ... Read More

Useful Firefox Add-ons

Posted on: Jan 11, 2012 By: Alan Bruce | 0 Comments
Just a quick post as I get back into things after the holidays. While I’ve had a chance to use most browsers (Internet Explorer, Opera, Chrome, Safari, etc) I tend to use FireFox day to day, so it’s no surprise that I do most of my testing and development on it. One of the nice things about modern browsers is that they allow you to use add-ons, and there are a number of them that are useful for web development. Here are a couple that I use. Firebug Firebug is a good, all purpose add-on that lets you view and debug HTML, Javascript ... Read More

Enhancing Your Website with JQuery

Posted on: Nov 30, 2011 By: Alan Bruce | 1 Comment
More and more recently I’ve found that I’ve had to add Javascript functionality to my PHP based websites; from something simple like hiding/displaying sections of a webpage based on user input to adding in UI features like Datepickers, menus, tabs, etc to using Ajax to modify the contents of a page. While it’s possible to do all of this from scratch, it’s time consuming – and most of it has probably already been done by someone else. That’s where Javacript libraries come in – they allow you to easily ... Read More

WordPress Mobile for iOS

Posted on: Nov 02, 2011 By: Alan Bruce | 0 Comments
Following up on Matt’s post on the WordPress mobile app for Android, I decided to look at the WordPress app for iOS. I mostly focused on the iPad version, but I did play with the iPhone version on my iPod touch; there are some differences in the interface but it’s a universal app so the functionality is pretty much the same on both platforms. Set up is pretty simple; once you download the app (which is available free from the app store) you will be prompted to enter in the information for your blog (just the URL for your site and ... Read More

Using WordPress Mobile

Posted on: Oct 19, 2011 By: Matthew Leering | 0 Comments
I’ve just installed the WordPress app (v 1.5.1) on my mobile phone (Android), and am quite impressed with it. It took no longer than a few minutes to have fully set up.  Initially it didn’t work for me, but that was because of a simple setting that was not yet set in my WordPress installation.  You’ll need to be an administrator in order to change that setting, and if you are, then you can simply put a checkmark in the box beside “XML – RPC” to get it to work.  This setting can be found under ... Read More

Using APIs in PHP

Posted on: Oct 05, 2011 By: Alan Bruce | 0 Comments
I wasn’t really sure where to start with this blog post. I’ve been writing articles and blog posts for CoreSolutions for a while, but they’ve mostly been on the FileMaker side of things, which really represents about half my job – for a good chunk of the last decade I’ve been splitting my development time between both FileMaker and PHP. Granted, my PHP development really came out of the need to pull data from a FileMaker database into a website, but I’ve gotten fairly comfortable with using PHP with other ... Read More

Tips and Tricks of phpStorm: Subversion

Posted on: Sep 06, 2011 By: Mark Phipps | 2 Comments
phpStorm and Subversion work together beautifully!  In large software projects, source control is a absolute must, and for this I love using Subversion (SVN).  Subversion allows you to save your changes in an organized manner and if you make a mistake, you can always go back to an older version.  Where more than one developer is working on a project, SVN handles change conflicts with relative ease. In phpStorm, the “changes” shortcut (usually located near the bottom left corner) brings you information about the recent changes in your ... Read More

Exploring WordPress – Metaboxes

Posted on: Aug 23, 2011 By: Matthew Leering | 0 Comments
The "Publish" Metabox Most of what you see in the back-end of WordPress will be contained in what are known as Metaboxes.  Metaboxes in WordPress: Provide functionality to each screen in the backend Organize information and functionality into logical groupings Ensure that back end content maintains a consistent look and feel Allow for customization of the back end layout Provide functionality to each screen in the backend We’ve already discussed the navigation in WordPress.  Almost everything else you’ll find in the ... Read More

Tips and Tricks of phpStorm

Posted on: Aug 10, 2011 By: Mark Phipps | 1 Comment
Welcome back CorePHP readers.  I’ve now had a chance to explore phpStorm a little more and I’ve found a few widgets that I think you might find useful when developing your own creations, but I’ll only talk about one today. One of the biggest widgets that I enjoy about phpStorm is the smart inspection widget that just works.  The smart inspection widget appears on the right hand side of the window when you are editing a file, just beside the vertical scroll bar. It’s purpose in life is to inspect the file you are ... Read More

Exploring WordPress – Navigation

Posted on: Jul 27, 2011 By: Matthew Leering | 1 Comment
Our reader base is quite the diverse crowd, and so, I want to dedicate a series of articles to those who might be unfamiliar with the basics of WordPress.  Each one of these articles is going to be pretty basic in its depth, but will hopefully help you get more out of your usage of WordPress. To start with, the first thing you’re going to need to know (once you’ve logged-in to your wordpress site) is how to navigate around the back end.  The main navigation of the back end is mainly facilitated via the left-most sidebar.  The ... Read More

Time to Upgrade

Posted on: Jul 12, 2011 By: Mark Phipps | 0 Comments
For several years now, our base development platform has been based on PHP version 5.2.  PHP 5.2 will run under Windows NT/2000/2003 with very few problems.  Of course, during this same time period, the environment has changed. The recommended version of PHP for production use is now 5.3.  5.4alpha1 was released on Jun 28, 2011 and promises to have improved memory usage and performance.  PHP 5.2, the version that we are currently using is no longer supported – thus the decision to upgrade any new release to use PHP 5.3.  5.3 offers much ... Read More

Why Is My App So SLOW?

Posted on: Jun 14, 2011 By: Mark Phipps | 0 Comments
If you’re like me, I’m sure you’ve said this at one time or another during the software development process.  The app that just takes forever to load – and then gives you that nasty fatal error message.  With some fiddling and a bit of adjusting, you usually get this to work, but it’s still slow.  What do you do? Following from my last blog, I’ve started using phpStorm for my developing here at CoreSolutions.  Part of this suite includes an extensive set of tools to help debug your apps.  With the addition of the xDebug ... Read More

Are You WP 3.2 Ready?

Posted on: Jun 07, 2011 By: Matthew Leering | 0 Comments
WordPress 3.2 is scheduled for release by the end of June.  That is of course, assuming that we get a lot of people testing and fixing any problems that arise within the newly released beta version.  I do not recommend that you use the beta version in one of your production sites, but if you’re a plugin or theme developer, or just anxious to see some of the new features, then feel free to try it out in a sandbox environment. It’s always a good idea to make sure that you’re running the latest stable version of WordPress for ... Read More

A Storm Approaches

Posted on: May 17, 2011 By: Mark Phipps | 1 Comment
The last few weeks swept away much of the old. It was simply amazing – looking at how all the little tricks I did were no longer needed. The feeling of being free and unrestricted when software just works. The coming storm blows all the tumbleweeds away, removes all the cobwebs and frees your time for things that matter – speed and productivity. Ladies and gentlemen, please let me introduce phpStorm: PhpStorm is a new, lightweight and smart PHP IDE. It provides so many new features that it will take several blogs to write about them ... Read More

WordPress Plugins

Posted on: May 03, 2011 By: Matthew Leering | 0 Comments
Plugins make for a very easy way to add new functionality to your website.  At the time of writing this, there are more than 14,000 plugins freely available for you to download through WordPress.org.  The type of functionality that they can add to your site can vary dramatically from plugin to plugin.  I tend to break down plugins into 3 main categories though, and I find that once you understand the three types of plugins, you’ll find it remarkably easy to work with any well-designed plugin out there. Example of Available Widget ... Read More

Enough already, no more WordPress blogs!

Posted on: Apr 19, 2011 By: Mark Phipps | 0 Comments
Ok, ok, ok – let’s divert our attention away from WordPress for a blog or two.    WordPress is an amazing tool to let you create highly dynamic and interesting websites, but underneath the glitz you have PHP doing all the hard work.   In the world, a high proportion of PHP websites are operating on a platform know as the LAMP stack.    No, no – this is not the illuminated torch sitting in the corner of your basement.   The LAMP stack represents the combination of four independent pieces of software, namely: Linux Operating ... Read More

WordPress – Child Themes

Posted on: Apr 07, 2011 By: Matthew Leering | 0 Comments
There have been a couple of posts in this blog series already that have made mention of WordPress themes and custom theme development, so I want to spend some time covering a hot topic today — Child Themes.  Child themes are in short, WordPress’ way of allowing the site’s developer to be able to modify a theme without directly touching any of theme’s core files.  This functionality is important for a couple of reasons: Since WordPress 3.0, site administrators are able to update their wordpress themes from the ... Read More

The Power of Themes

Posted on: Mar 23, 2011 By: Mark Phipps | 0 Comments
Customized themes are an essential part of the websites we create and use here at CoreSolutions.  While there are literally hundreds of WordPress themes available, none of them fit with the CoreSolutions brand – this is why we have created and customized our own. In a previous article, I mentioned a few themes that I felt were interesting, including “Adventure Journal” and “Nanoplex Theme”.  If you like something about these themes, but not everything, then change it into something that you do like. There are a few ways that you ... Read More

Source of Potential Confusion – Posts vs. Pages in WordPress

Posted on: Mar 08, 2011 By: Matthew Leering | 1 Comment
I mentioned in an earlier article, how each page you can visit on a website will not necessarily have its own file on the web server.  In the case of a CMS, often times the same file will get reused for multiple web-pages.  Understanding that is going to be very important if you decide to create your own theme for WordPress.  What if you’re new to WordPress though, and just want to understand the very basics? If that’s the case for you, then you’ll probably want some clarification on certain potentially confusing aspects ... Read More

Extending WordPress

Posted on: Feb 22, 2011 By: Mark Phipps | 0 Comments
Picking up from where Matt left off last week, WordPress does flex its muscles in terms of themes, plugins and apps for the mobile devices. Navigating to the free themes directory as WordPress.org, there are currently 1321 themes available for download.   If you are looking for a theme to record a recent trip and travel adventure, the Adventure Journal might just be for you.   If you want “add a touch of colour to life”, the Nanoplex Theme may tickle your fancy.   There are many themes to choose from, and the best part about this is ... Read More