Пример #1
0
 private function _callWeboctave()
 {
     $form = array('commands' => $this->_script);
     $http_client = new http(HTTP_V11, true);
     $http_client->host = 'hara.mimuw.edu.pl';
     $status = $http_client->post('/weboctave/web/index.php#menus', $form);
     $this->_octaveResult = $http_client->get_response_body();
     $http_client->disconnect();
     unset($http_client);
     $dom = new Weboctave_htmldom($this->_octaveResult);
     return $dom->getOctaveResult($this->_iterations);
 }
Пример #2
0
<?php

require_once 'http.inc';
header('Content-Type: text/plain');
$form = array('value' => 1, 'date' => '05/20/02', 'date_fmt' => 'us', 'result' => 1, 'lang' => 'eng', 'exch' => 'USD', 'Currency' => 'EUR', 'format' => 'HTML', 'script' => '../convert/fxdaily', 'dest' => 'Get Table');
$http_client = new http(HTTP_V11, true);
$http_client->host = 'www.oanda.com';
$status = $http_client->post('/convert/fxdaily', $form, 'http://www.oanda.com/convert/fxdaily');
if ($status == HTTP_STATUS_OK) {
    print $http_client->get_response_body();
} else {
    print "An error occured while requesting your file !\n";
    print_r($http_client);
}
$http_client->disconnect();
unset($http_client);