James Morris - JMOZ

I pretend I know PHP and internet stuff. Currently contracting at TimeOut London.

    • 2
      7 Sep 2011

      PHP news

      • Edit
      • Delete
      • Tags
      • Autopost

      I've noticed recently a lack of PHP news/articles/blog posts coming to my attention.  I'm sure I used to see a constant stream of them but I can't remember my sources.  Maybe its my increasing reliance on Twitter as a source of everything - general news, local info, tech news and banter with friends.  I used to use Google Reader a lot, and sites such as Digg, Popurls, Mixx etc but they all seem to have dropped in quality or they get increasingly harder to manage (GReader rss feeds) whilst everywhere else seems to have a Twitter feed.  So this is more of a request for comments or tips on decent sources of PHP news.  You can reply by comment or tweet me at @jwm0z.  I'll list some of mine:

      Twitter

      Any tech site or person that tweets about PHP I tend to follow, I have a twitter tech list (which probably could do with being split into a php list) and I also watch a #php and #symfony2 search in my Tweetdeck.

      Web Sites

      One of my favourite sites to follow is PHP Developer, they reblog a lot PHP articles from developer blogs (including mine) and they have a busy twitter feed.

      Some others include Planet PHP, DZone PHP, Zend Developer Zone but I never seem to catch their updates as often as I do as PHP Developer's.

      Too many channels

      There's just too many channels of information available to be able to get a good overview of the PHP scene.  For me, Twitter is probably the easiest to manage but I need to follow more decent sources of technical articles and news.  If you've got any lists to share or think it's worthwhile me following you, please get in touch!

      • views
      • Tweet
    • 0
      5 Sep 2011

      A Symfony2 console Command and the Foursquare API venuehistory

      • Edit
      • Delete
      • Tags
      • Autopost

      I've been playing with the Foursquare API recently, I'm attempting to get a new homepage built and want to display a map of where I hang out. I use Foursquare quite a bit so wanted to get the locations from their API then plot them on Google maps.

      There's a venuehistory endpoint that gives you a massive list of all the venues you've checked into with details such as the venue name, location including lat and lng coordinates, and the count of times you've checked in.

      Here's a screenshot of their json response.

      Media_httpdldropboxco_gdpci

      I want to pull this into my own database so I have a local copy of it and can play around with it. I'm using Symfony2 so I've created a console command which I can run on a cron, or on demand. I decided to do it this way as mainly a learning exercise and also this is a bit better than a standard php script.

      The command hits the endpoint with my Oauth access token (outside of the scope of this article, but see the docs for details) and then simply loops over the response and creates a load of Checkin entities which the entity manager then persists.

      The command takes an optional argument for the access_token or otherwise defaults to a parameter. There's also an optional flag to disable the truncation of the checkins table. You can see how to set these up along with the help text in the configure() method. Output is handled by the call to $output->writeln() and you can see how highlighting works in the screenshot of the output.

      Media_httpdldropboxco_rkcdq

      I may write a future post showing how to push the Foursquare code into a service based implementation so look out.

      • views
      • Tweet
    • Search

    • My Sites

      • James Morris
      • Mixcloud Downloader
      • Shoreditch Vietnamese
      • I HEART Shoreditch
    • Tags

      • php
      • Symfony2
      • ubuntu
      • FOSUserBundle
      • clouddownload.co.uk
      • roles
      • shoreditch
      • symfony
      • 301
      • SplObserver
      • SplSubject
      • android
      • api
      • codename
      • command
      • console
      • contract
      • cucumber
      • delete
      • docky
      • dotdeb
      • errors
      • exif
      • firewatir
      • foursquare
      • http
      • imagick
      • iphone
      • mario
      • maverick
      • mixcloud
      • netbeans
      • news
      • nginx
      • observer
      • php 5.3
      • pidgin
      • poker planning
      • put
      • ruby
      • scrum
      • session
      • shit
      • shoreditchvietnamese.co.uk
      • skype
      • stripImage
      • sudo gem update --system
      • super hub
      • twitter
      • version
      • vietnamese
      • virgin media
      • watir
    • Archive

      • 2011 (22)
        • December (3)
        • November (4)
        • September (3)
        • August (3)
        • July (1)
        • May (2)
        • April (4)
        • March (1)
        • January (1)
      • 2010 (1)
        • April (1)
    • Contributors

      James Morris
    • Obox Design
  • James Morris - JMOZ


    30382 Views
  • Get Updates

    Subscribe via RSS
    TwitterFacebookLinkedIn