Skip to content

Andy's blog o' goodness

php, web stuff, raspberry pi… even blacksmithing!

August 23, 2012

Zend Framework 2 – JSON-RPC Server

Creating a JSON-RPC server in ZF2 is very similar to how you would do it in ZF1, so you could pretty much follow the documentation for version 1. However, here is an example of how to implement with version 2.

Categories PHP/Zend Framework Comments: 0
August 2, 2012

MSC Executive Mobile Charger review

The other day I was asked if I’d like to review a solar charger battery pack for portable devices that comes from Mobile Solar Chargers. At first I was a little dubious because I’ve seen some battery packs and solar chargers that have been rather badly constructed/have a flimsy design and provide as much power a lemon-powered battery. But as...

Categories Gadgets Comments: 0
April 13, 2012

Handy little function

Quite often I find myself wanting to run the same script by either cli or through a browser. But I don’t want to fill my echo statements with <br /> tags if I’m on cli because that’d just look ugly, but at the same time I don’t just want to use \n when outputting in the browser because everything would...

Categories Code snippets/PHP Comments: 0
September 26, 2011

Merge two urls using PHP

This is a handy function for combining two urls. The urls could be strings or parts in an array (as you’d get from the parse_url function), or you can mix-and-match. Check out the examples in the docblock below to see what I mean. loading gist…

Categories Code snippets/PHP Comments: 0
June 18, 2011

Dreamhost and procmail – parsing your mail with a script

I have a Dreamhost account and have done for some while. Typically I’m happy with their service, but yesterday was the first real frustration I had with them. I wanted to use procmail to send email to a script for processing. I was sure I had done this before on Dreamhost, but couldn’t seem to get it to work in...

Categories General Comments: 0
May 15, 2011

Using CSS3 sucks (right now, but I’m sure it’ll get better)

Am I the only one to think that using a number of aspects of CSS3 right now really sucks? The potential it offers is great, but does anyone really think doing something like this for a gradient is a productive use of time? [code lang=”css”] background: #9880cc; /* Old browsers */ background: -moz-linear-gradient(top, #9880cc 0%, #bab3cc 93%); /* FF3.6+ */...

Categories General Comments: 0
April 8, 2011

Sorting an array of objects by one or more object property

Quite often I find myself having an array of objects and needing to sort that array of objects by property (either one property or multiple)… Imagine, for example, getting a large result set from your database and ordering in the query just takes too long. Or perhaps you’re getting results from a web service and that service doesn’t return the...

Categories Code snippets/PHP Comments: 3
October 31, 2010

Extend Zend_View_Stream to easily escape view variables

Zend_View_Stream is used pretty much when ever you use Zend_View, and I’ve blogged about how handy it is before.  But as it’s a class like any other, you can extend it to give added functionality.  One such use is to add automatic escaping to your view variables when you want.  So instead of doing: [code lang=”php”] <?php echo $this->escape($this->var); ?>...

Categories PHP/Zend Framework Comments: 0
October 10, 2010

Today’s date is the answer

The date today is 10/10/10. 101010 in binary is 42 which is, as we all know, the answer to life the universe and everything in it.

Categories General Comments: 0
October 9, 2010

PHPNW

Usually I’m a total wallflower at conferences, gravitating to only the people I know. This time round I’m trying to change that and speak to people, ask speakers questions, and all that. Right now, though, I’m enjoying dinner. 🙂

Categories General/PHP Comments: 0

Posts pagination

  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • 12
  • 13
  • »

Me elsewhere

  • Follow me on GitHub
  • Follow me on Twitter
  • My GitHub gists
  • My LinkedIn profile

Tags

amp (2) anvil (3) blacksmithing (8) book (3) build (3) conference (2) error log (2) extension (2) filter (3) forging (7) gist (2) github (7) gpio (3) gui (4) htpc (2) interface (2) javascript (6) jQuery (7) metal (3) objects (2) opcache (3) packt (3) PHP (20) phpnw (2) phpnw10 (2) plug-in (5) plugin (2) Prototype (2) python (3) raspberry pi (7) reactjs (2) review (3) rpi (7) snippet (6) trailcam (2) view helper (3) webinar (2) windows (2) wiringPi (2) Zend Framework (11) zend opcache (2) Zend Studio (2) zend_view (2) zend_view_stream (2) zephir (3)

Categories

  • Blacksmithing (10)
  • Code snippets (20)
  • Databases (2)
  • Experiments (8)
  • Gadgets (5)
  • General (41)
  • GitHub (2)
  • javascript (17)
  • jQuery (7)
  • PHP (47)
  • Prototype (4)
  • Python (2)
  • Raspberry Pi (8)
  • Sites (2)
  • Subversion (1)
  • Updates (2)
  • works07 (6)
  • Zend Framework (17)

Archives

  • November 2023
  • July 2023
  • May 2023
  • November 2022
  • October 2020
  • September 2020
  • July 2020
  • April 2020
  • April 2019
  • March 2019
  • February 2019
  • January 2018
  • November 2017
  • August 2017
  • July 2017
  • May 2017
  • January 2017
  • November 2016
  • July 2016
  • June 2016
  • February 2016
  • September 2015
  • July 2015
  • June 2015
  • April 2015
  • November 2014
  • October 2014
  • June 2014
  • February 2014
  • November 2013
  • April 2013
  • March 2013
  • August 2012
  • April 2012
  • September 2011
  • June 2011
  • May 2011
  • April 2011
  • October 2010
  • September 2010
  • May 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • September 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • April 2008
  • March 2008
  • January 2008
  • December 2007
  • October 2007
  • September 2007
  • August 2007
  • June 2007
  • April 2007
  • March 2007
  • February 2007

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Help pay for hosting?

Me elsewhere

  • Follow me on GitHub
  • Follow me on Twitter
  • My GitHub gists
  • My LinkedIn profile

Tags

amp anvil blacksmithing book build conference error log extension filter forging gist github gpio gui htpc interface javascript jQuery metal objects opcache packt PHP phpnw phpnw10 plug-in plugin Prototype python raspberry pi reactjs review rpi snippet trailcam view helper webinar windows wiringPi Zend Framework zend opcache Zend Studio zend_view zend_view_stream zephir

Help pay for hosting?

Categories

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2007-2025 Andy's blog o' goodness. All thoughts expressed are my own.

Coldbox WordPress theme by mirucon

  • Twitter
  • GitHub
Back To Top