PHP BrowserID Verifier

This is the first PHP code I have written in YEARS, so any comments would be welcome! I am in the middle of writing a MediaWiki extension for BrowserID and thought this might help some people out who are looking to get started with plugins of their own.

I am using cURL to do the actual verification, the only thing that baffles me is how the response to the cURL request gets returned as the value of the GET request that calls this code. Any suggestions/reasons would be greatly appreciated!


<?php 

Class BrowserIDVerify {
  public static function login($audience, $assertion) {
    $url = "https://browserid.org/verify";
    $data = array(
      'audience'=>$audience,
      'assertion'=>$assertion
    );
    return BrowserIDVerify::do_post_request($url, $data);
  }

  private static function do_post_request($url, $data) {
    $data_string = http_build_query($data);

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_POST,count($data));
    curl_setopt($ch,CURLOPT_POSTFIELDS,$data_string);
    $result = curl_exec($ch);
    $info = curl_getinfo($ch);

    curl_close($ch);

    // If anybody could explain to me how/why the result gets returned
    // as the response to the initial GET request that calls this code,
    // I'd be very grateful.
    return '';
  }

}

?>