Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Connecting to External Webservices

$t->fetch is the primary BMP utility for connecting to external web services.

HTTP Authentication

HTTP authentication with Fetch
$usr = 'username';$pwd = 'password';
 
// method 1 - login details in URL
$url = "https://$user:$pwd@webservice.dmz.google.com";
$t->fetch($url);
 
// method 2 - login details in HTTP Header
$url = "https://webservice.dmz.google.com";
$headers = array('CURLOPT_USERPWD' => "$usr:$pwd");
$t->fetch($url, $post = '', $headers);
 
// return
echo $t->result;
  • No labels