Changed regex to prevent wasted PREG searching and backtrack deaths.
Add decoding of the response for curl