Using PHP and curl with http PUT on string data
This wasn’t obvious
There are various other posts on this - but mostly assuming you will put a file.
In my case I want to put the contents of a string so I needed to create a temporary filehandle.
Technical information on this site may be out of date : no updates since 2015
This wasn’t obvious
There are various other posts on this - but mostly assuming you will put a file.
In my case I want to put the contents of a string so I needed to create a temporary filehandle.
I read this post the other day and found it really inspiring - so many things to do and learn…
http://bergie.iki.fi/blog/my_secret_agenda_for_php_content_management_systems/
Links within that blog that I found especially interesting
Hudson http://hudson-ci.org/ is a continuous integration server - it runs and monitors ‘jobs’ in a way that is useful to regularly build software and report on any errors.
Selenium http://seleniumhq.org/ is a suite of tools specifically for testing web applications - it tests the full website by automating the running of one or more browsers (so you can test all that pointy clicky ajaxy stuff)
It’s been a while since I’ve worked on a project which is providing as well as consuming web services.
In this case I need to debug incoming requests that are not initiated from with the browser (I’m using soapui as a test tool).
In order to allow Eclipse to pick up xdebug responses triggered by requests from soapui I just needed to
I’ve been working on a couple of open data projects recently - which has been very rewarding.
A couple of people have asked for some code so I’ve knocked up a quick version of the sort of thing I’ve been working on.
This code requires PHP 5.1 for the JSON functions but doesn’t need any extra libraries (pecl_http can give better error messages but is a bit of a pain to install).
The Notes field in packages returns output in Markdown format - you can convert this to HTMl with a parser available at http://michelf.com/projects/php-markdown
This isn’t production code so please test before using.
Drupal has a fairly easy to meet set of requirements http://drupal.org/node/502452
But Drupal projects are free to set their own rules in this area and Drush has used functions only available in PHP 5.2 - as far as I can see this is just the json functions.
OK so it isn’t quite multi-threaded, but forking and controlling processes in the command line environment is still pretty powerful and something I’ve wanted to do on a couple of occasions.
xdebug is an immensely powerful tool for exploring what your code really does.
You can get a long way using print_r but ultimately this always requires that you predict the path your code will take - and the tricky bit about debugging is you need it when your predications have gone wrong.
It’s generally pretty easy to set up
A few days into learning Symfony and so far I’m keen on
Well having found the Definitive Guide to Symfony a bit uninspiring I’ve spent a bit of time on the “Practical Symfony” book - online.
http://www.symfony-project.org/jobeet/1_2/Propel/en/
So far it’s great - the first “three days” lessons went by pretty quick, and I’m glad I’d done some background reading.