What is Web Service?


Web Services is a generic umbrella that describes how disparate systems can integrate with each other over the web.
Most major sites offer some form of web services:
– Amazon
– FedEx
– eBay
– PayPl
– del.icio.us

Why use Web Services?

  • Someone else has data you need
  • Easier than scraping pages also more reliable
  • Automate processes
  • Provide additional information to your clients

REST

  • Representational State Transfer
  • Requests look like filled out forms, can use either GET or POST
  • Response is an XML document
  • Request and Response is defined by the service provider
  • Very simple and popular

REST Request
http://library.example.com/api.php?devkey=123&action=search&type=book&keyword=style

After the request, we will get the answer or response as an XML file. we can simple parse them using PHP’s SimpleXMLElement (SAX API) or DOM API to retrieve data

mahmud ahsan

Computer programmer and hobbyist photographer from Bangladesh, lives in Malaysia. My [Github | Business | Twitter | Linkedin | Instagram | Flickr | 500px]

You may also like

2 Comments

  • Kumaran
    August 21, 2010 at 4:10 pm

    Hi Mohammed,

    Can you send me some sample code for web service. Its more helpful for us. Thanks

    I am waiting for your reply..Please do favor for me.
    Best Regards,
    Kumaran.

    • mahmud ahsan
      mahmud ahsan
      August 22, 2010 at 6:08 pm

      Most of the popular web sites like google, youtube, yahoo, amazon has their own web service, you can easily use them by their api. So search in google, and you’ll find lots of tutorials for it.

Comments are closed here.