nusoap php webservices 类

时间:2014-05-29 11:29:08
【文件属性】:

文件名称:nusoap php webservices 类

文件大小:127KB

文件格式:PHP

更新时间:2014-05-29 11:29:08

nusoap,php,webservices

实例: "Any", "password"=>"Any", "ticker"=>$symbol); // Call the webservice "doCompanyInfo" method with the arguments. $results = $client->call("doCompanyInfo", $args); /* $results is an array with the following structure Array ( [symbol] => MU [company] => MICRON TECH [lastPrice] => 10.29 [tradedDate] => 1/10/2003 [tradedTime] => 4:01pm [change] => 0.34 [changePercent] => +3.42% [volumne] => 8895900 [averageVolume] => 9653090 [bid] => N/A [ask] => N/A [yesterdayClose] => 9.95 [open] => 10.04 [yearHigh] => 39.5 [yearLow] => 9.40 [dayLow] => 9.90 [dayHigh] => 10.38 [earnPerShare] => -1.59 [PE] => N/A [divDate] => 1-May-00 [yeild] => 0 [divShare] => N/A [marketCap] => 6.226B ) */ // We would now format the data for output in HTML. $html = "\n\nCompany Info. Webservice client - Written by: Tim Akinbo\n\n"; $html .= "\n"; $html .= "

\n\n"; $html .= "\n"; $html .= "\n\n\n\n
 Company Info
\n\n\n"; $html .= "\n\n"; $color = "#000000"; // $color is set to green if we have an appreciation in value ("+" present in $results['changePercent']) if (preg_match("/^\+/", $results['changePercent'])) $color = "#00CC33"; // else it is set to red if we have a depreciation ("-") if (preg_match("/^-/", $results['changePercent'])) $color = "#FF0000"; $html .= "\n\n\n"; $html .= "
Company NameStock SymbolPercentage Change
" . $results['company'] . "" . $results['symbol'] . "" . $results['changePercent'] . "
\n
\n\n"; echo $html; ?>


网友评论

  • php自带的好用。。搞了半天,用自带的就搞定了。。。
  • 东西不错,不过最后还是用了php自带的
  • 一直用着,很不错的资源
  • 东西不错,很好用
  • php版本的问题真是让人头大!
  • 可以用,不过最后没用这个,通过php自带的那个类库用了