In twitter_process() comment out
  curl_setopt($ch, CURLOPT_NOBODY, 0);
  curl_setopt($ch, CURLOPT_HEADER, 0);

Also, change
    curl_setopt ($ch, CURLOPT_POST, true);
to
    curl_setopt ($ch, CURLOPT_POST, 1);

There is a problem because you are sending (if !empty($post_data)) the
HTTP Method HEAD and POST, if you comment out the lines above, it
should work, then if it does, then good. The NOBODY and HEADER
shouldn't be used at all anyway in your setup because they will
disable the header and the body, it seems like in the rest of your
code you need those as you perform different tasks with the body and
the header (if is 200).

Hope that helps!
- James Hartig

Reply via email to