Do you have any good suggestions for developing web Service in PHP?

Source: Internet
Author: User
Tags representational state transfer
Never make a web Service, let alone PHP. What do you have to give me some advice? I myself Baidu a bit, looked for an article, talking about using Nusoap to do Web services also downloaded a look, the sample program runs successfully. But there are a few more questions, the solution answer:
1. When will the WEB service be used? Why do you use this time?
2. Do you use Nusoap more now? If not, what's the best recommendation?
Thank you.


Reply to discussion (solution)

Question answer: 1, Web Service is of course need time to use, such as some website SSO landing, weather forecast, can call webservice. Because it is a set of good programs, we just need to pass in the corresponding parameters, we will return the corresponding results.
2, PHP call Web service Nusoap or use a lot of. If you do not want to call the Web service, you can try to develop a new method, and the new class to achieve the same functionality, but the cost is too large, not recommended, there is webservice with the use of webservice better.

The Web service is divided between the client and the server, and for us to invoke it, we just need to instantiate it on the client and pass in the parameters directly.

PHP provides a SOAP extension, why not consider using it?
A substitute for SOAP?? Can REST also be considered?

Soap????? It's good, huh? The use of???? have been connected to a??.

1. When will the WEB service be used? Why do you use this time?
You can call it by writing a good webservice, in other languages or platforms, such as the client is C#,java,python,ruby
For example: You make a system (PHP), other people's system is C #, need to call your PHP program, the best way is to call the database directly, but the security is not good, so you write a Web service through PHP, C # directly write a client directly call your PHP webservice, This will allow you to complete the function.
2. Do you use Nusoap more now? If not, what's the best recommendation?
If you don't need nusoap, you can use SOAP, which is an extension of PHP's own.

PHP provides a SOAP extension, why not consider using it?
A substitute for SOAP?? Can REST also be considered?

Using the soap in PHP, use Eclipse to write a WSDL yourself.

Rest has not yet been seen, alas.

1. When will the WEB service be used? Why do you use this time?
You can call it by writing a good webservice, in other languages or platforms, such as the client is C#,java,python,ruby
For example: You make a system (PHP), other people's system is C #, need to call your PHP program, the best way is to call the database directly, but the security is not good, so you write a Web service through PHP, C # directly write a client directly call you PHP ...

Boss, do you personally think that's good? Is it a nusoap?

PHP provides a SOAP extension, but does not provide writing WSDL. It is obvious that PHP developers are not optimistic that the SOAP originated from Microsoft
But PHP developers have made a lot of effort to RPC, the predecessor of SOAP.

Unsoap is just a class of PHP code, from the operational efficiency, normative, must be the second to PHP_SOAP expansion of the

REST (representational state transfer) is a design and development approach to network applications that reduces the complexity of development and increases the scalability of the system.


The rest protocol is more convenient

Reference 5 Floor zy205817 's reply: 1. When will Web service be used? Why do you use this time?
You can call it by writing a good webservice, in other languages or platforms, such as the client is C#,java,python,ruby
For example: You make a system (PHP), other people's system is C #, need to call your PHP program, the best way is to call the database directly, but the security is not good, so you write a Web through PHP ...
If you use Nusoap, you can call the class directly, and if you take advantage of PHP soap, you will need to generate additional file encodings by using your own tools.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.