function fp_url_get_contents

7.x misc.inc fp_url_get_contents($url)
6.x misc.inc fp_url_get_contents($url)

This function uses CURL to get the simple contents of a URL, whether http or https.

2 calls to fp_url_get_contents()
calendar_get_appointments_for_faculty in modules/calendar/calendar.module
Return back a list of appointment content nodes for this faculty member, which fall between the specified datetimes.
update_status_perform_check in modules/update_status/update_status.module
This function actually performs the update status check with getflightpath.com

File

includes/misc.inc, line 675
This file contains misc functions for FlightPath

Code

function fp_url_get_contents($url) {

  /*
  $ch = curl_init();
  
  curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
  curl_setopt( $ch, CURLOPT_HEADER, 0 );
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
  curl_setopt( $ch, CURLOPT_URL, $url );
  curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );

  $data = curl_exec( $ch );
  curl_close( $ch );

  return $data;  
  */

  // Make use of the superior fp_http_request instead.

  $res = fp_http_request($url);
  if (is_object($res) && isset($res->data)) {
    return $res->data;
  }

  return FALSE;

}