ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What are the web services in php and how are they used in a project?

user-image
تم إضافة السؤال من قبل bhagyashri deshpande , Web Developer , Ideotrix Technology pune
تاريخ النشر: 2013/08/19
islam khalil
من قبل islam khalil , Technical Manager , iCloudit

Webservice its not about PHP only ! 

Web services are client and server applications that communicate over the World Wide Web's

And you can use many protocol to do this .

 

Example :

1-Weather Web service :

You can use this to get weather condition about your current city .

URL Example :  http://www.webservicex.net/globalweather.asmx?wsdl

 

2-Money Converter Web service:

You can use this to get currencies rate from a provider .

 

Code Exnaple :

$client=newSoapClient("http://www.webservicex.net/globalweather.asmx?wsdl");

$params=new stdClass;$params->CityName='Auckland';

$params->CountryName='New Zealand';

$result= $client->GetWeather($params);// Check for errors...

$weatherXML= $result->GetWeatherResponse;

 

 

I hope this is helpfull 

 

Feras Abualrub
من قبل Feras Abualrub , Web Solutions Manager , Qistas for Information Technology

Take the  abstraction

-------------------------------------------------------------------------

 

The basic Web services platform is XML + HTTP.

XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions.

The HTTP protocol is the most used Internet protocol.

Web services platform elements:

  • SOAP (Simple Object Access Protocol)
  • UDDI (Universal Description, Discovery and Integration)
  • WSDL (Web Services Description Language)

Web services are typically application programming interfaces (API) or Web APIs that are accessed via Hypertext Transfer Protocol (HTTP) and executed on a remote system hosting the requested services.
Web services tend to fall into one of two camps: big Web services and RESTful Web services.check this link So in a nut shell, i use web services to access data from my database n i use php to convert the data in form of json by using json_encode() function in php and i can access the data by requesting a http request to the php file i created i.e http://localhost:8030/traffic/reportedaccident.php

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟