Fixing preg_replace and CURL options

These edits fix a missing ']' in a preg_replace function and also adjust the $verifyhost value in CURL to 2, as 1 is being deprecated soon.