Php posts, page 4 of 7.

Archiving (Scraping) a Site

Last week I wrote a little post and script to archive a directory. This can be really helpful if you're looking to backup some legacy code, especially a deeply nested old website, but what if the files only live online? How do you reach out to the internets and archive (scrape) a front-end?

There…

  • Category Web Development
  • Posted October 5, 2013
  • read more

Archiving a Directory

Recursively tracing out a full directory and saving the files in an archive seemed like a fairly easy thing to do. After all, I knew how to glob() and was reasonably sure that the environment I was working in had the ZIP extension built into the PHP. But wait... Recursion? glob() does not handle…

  • Category Web Development
  • Posted September 30, 2013
  • read more

Fake Linkedin Endorsements

Sketch of 1, 2, and 3 letter combinations

One thing that you can do on the internet is to endorse people on Linkedin. You just visit one of your connection's profiles on the site and pick some skills pulled from their profile (and/or add new ones) and endorse them. This is a great way that you can 'validate' listed skills and give out…

  • Category Web Development
  • Posted September 3, 2013
  • read more

Rich Comment Formatting

Comments are an important part of a blog. Too often blogs are used as a soapbox for one person to state their ideas and opinions out into the open air of the internet without any sort of inline interaction. Comments allow an audience to give feedback, debate the points, or provide their own views…

  • Category Web Development
  • Posted July 8, 2013
  • read more

Manipulating JPEG EXIF Headers

Reading and writing EXIF headers into JPEGs is not something that PHP offers a lot of help with. Outside of one helper function for reading, exif_read_data, which returns a wide variety of meta data about the image (including non-EXIF basic properties of the file), there is no easy way to read or…

  • Category Web Development
  • Posted July 3, 2013
  • read more

Resizing Images with PHP

Of all the memory-intensive processes that you can do with PHP image resizing is one of the most abused. It may be tempting to have the power of requesting any image in any size, passing the parameters in to a script and boom, having a custom fitted image, but it's not a great idea. There are…

  • Category Web Development
  • Posted June 25, 2013
  • read more

Parsing Google Calendar - Recurring Events

Dealing with normal events in a Google Calendar feed is not too tough. Looping through each event and pulling the basic chunks of information (title, description, times) is easy once you hook up the correct namespacing to the nodes. Once you get into recurring events, though, things get more…

  • Category Web Development
  • Posted June 10, 2013
  • read more

Parsing Google Calendar - Starting Out

Pulling and parsing a Google Calendar feed sounds like a fairly straightforward project. After all, you are provided with both an XML and iCal Address (even for private calendars) for each calendar on their settings page. It didn't take me long to realize that there are unique pieces of these feeds…

  • Category Web Development
  • Posted June 9, 2013
  • read more

Finding the Closest X to Y

Following roads to get distance information

Finding the distance between different locations is a programming task that I've done a number of times. The idea seems simple - the user wants to know the closest branch, store, or distributor relative to them. Ignoring some possible use cases (commuting routes, varying convenient starting…

  • Category Web Development
  • Posted April 21, 2013
  • read more

A Simple Mail Object

Sending plain emails with PHP can be pretty easy. On a basic level you can just call mail(), which triggers the server-side sendmail command. Pass in three parameters (a recipient email address, subject, and message) and you're done. When you start looking into file attachments and HTML messages,…

  • Category Web Development
  • Posted April 12, 2013
  • read more

Activity Stream

  • Read 'Salem's Lot by Stephen King.
  • Read Elantris (Elantris, #1) by Brandon Sanderson.
  • Read It by Stephen King.
  • Read Mistborn Trilogy (Mistborn, #1-3) by Brandon Sanderson.
  • Read Tress of the Emerald Sea by Brandon Sanderson.
View more activities…