The Slim PHP framework is a great place to start up a back end for a website. I’m sure I haven’t mastered it yet, but there’s good documentation, and it seems to go pretty fast. My big issue this time was trying to figure out why it wouldn’t route correctly. Here’s my notes for figuring it out…
At the Google I/O conference, they announced the release of Polymer 1.0. I’ve been wanting to get into Polymer for a while now, and that was the one nudge that I needed. I decided to take a stab at redesigning my website’s home page with Polymer.
Here’s what I have learned…
I have been working on getting data transfer encrypted for parts of my website, and I think I have a solution! Rather than encrypt all of the site with an expensive SSL certificate, I am just going to encrypt the AJAX calls.
Here are the resources that I am using:
Do you have any experience with this or anything similar? Comments are welcome!
Update: I am still trying to get it working… Check out my question here.
Update: Here’s a nice link to help with generating the key: madboa.com: OpenSSL Command-Line HOWTO — How do I generate an RSA key?
Update: I haven’t been able to get pidCrypt to work. I found another tool that looks very good called jCryption, but I can’t make it work because my host doesn’t provide the bcMath library. I found a couple more helpful pages here and here.
I have been working with Google’s Webmaster Tools, and one of the things that it requires is a sitemap. It took me some tweaking to get it right, but here is what I learned.
First, I had to hand craft a sitemap php file for the main, parent site. The first thing that I struggled with was how to get the content type and XML heading in a php file. The solution was the header() command and to use the echo command.
Here is the heading of my sitemap page:
<?php header("Content-Type: text/xml"); echo '<' . '?' . 'xml version="1.0" encoding="UTF-8" ' . '?' . '>' ?>
The next hurdle was to determine how to include the last modified field. I found the filemtime() command could read the last time the file was changed. Then, the date() command using the DATE_W3C format puts it in the correct format that the sitemap expects.
Here is what an entry looks like.
<url> <loc>http://digitaleagle.net</loc> <lastmod><? echo date (DATE_W3C, filemtime('index.html')) ?></lastmod> <priority>0.4</priority> <changefreq>monthly</changefreq> </url>
I didn’t need to mess with any of the settings. I should have blogged this as I was doing it, but if I remember right, I had to visit this page the first time to generate the sitemap. From there, it takes over.