przykład usługi internetowej php [zamknięty]

Jestem nowy w usługach internetowych. Chciałbym uzyskać dobry samouczek i przykład dla usług internetowych przy użyciu PHP. Proszę zasugerować mi kilka stron internetowych, które wyjaśniają te rzeczy w prosty sposób.

Dziękuję...

Author: Miya, 2010-11-22

4 answers

 30
Author: stillstanding,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-04-28 22:54:21

To jest to, czego potrzebujesz.

Upewnij się, że masz zainstalowany Zend Framework - jest napisane jak go zainstalować, jeśli go nie masz.

Dobrą rzeczą jest to, że pozwala na odkrywanie-reszta samouczków w sieci nie są podstawowe POST / GET - nie wykrywa usług.

<?php
ini_set('include_path', '/usr/share/php/libzend-framework-php/');
require_once 'Zend/Soap/AutoDiscover.php';
require_once "Zend/Soap/Server.php";

class BogdansInjectData {

 private $quotes = array(
    "one" => "answer one");  

  /**
   * @param string $quote
   * @return string
  */

  function PushData($quote) {
    /* just encase the string is in uppercase*/
    $symbol = strtolower($quote);
    /* if there is a quote for the day requested */
    if (isset($this->quotes[$quote])) {
      return $this->quotes[$quote];
    } else {
      /* else error */
      throw new SoapFault("Server","Unknown Symbol '$quote'.");
    }
  }
}

// if(isset($_GET['wsdl'])) {

$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('BogdansInjectData');
$autodiscover->handle();


?>

Dzięki, Bogdan

PS: podążaj za tym postem, ponieważ jest to źródło rozwiązania i jest stale aktualizowane: http://www.getcomputerservices.co.uk/web-development/php-web-service-with-microsoft-discovery/

 3
Author: Bogdan Ciocoiu,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-11-11 16:14:00

Oto prosty przykład, który może pomóc Ci zacząć:

Https://stackoverflow.com/questions/502547/restful-webservice-to-sum-a-list-of-numbers

A oto nieco bardziej skomplikowany przykład:

Php webservice, który zabiera JSON przez POST i wypluwa obraz

 1
Author: dreeves,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-05-23 12:09:16
 0
Author: Julian,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-04-16 08:11:41