{"id":173,"date":"2011-06-24T00:18:49","date_gmt":"2011-06-24T00:18:49","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=173"},"modified":"2014-03-19T09:14:24","modified_gmt":"2014-03-19T09:14:24","slug":"connect-a-web-service-in-a-php-page","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/","title":{"rendered":"Connect a web service in a php page"},"content":{"rendered":"<h2>Connect a web service in a php page<\/h2>\n<p>Connect a web service in a php page instantly lighten the SOAP in our mind as a first word when we talk about web service in php. In simple words if i explain it to you that how can you call this service or connect this service in your php page so you have to make it clear in your mind that you are communicating to a server. When you are communicating to a website or a server, being on web you have to follow the standards and for our convenience a language is introduced which we call XML. So one thing should be clear that response can or will come in XML format. Now, we have to check that what type of structure will that server follow, so it depends upon that query which you are sending as a request.<br \/>\nI am quoting a couple of examples here:<\/p>\n<ol>\n<li>http:\/\/www.centrina.com.br\/WSConsumoPortal\/Service.asmx?op=getListaImoveis<\/li>\n<li>http:\/\/www.centrina.com.br\/WSConsumoPortal\/Service.asmx?op=getFotos<\/li>\n<\/ol>\n<p>one of them is getting list of movies and other one is getting fotos. <br \/>\nBut the difference comes here when we call these URLs or methods differentiate that how we send requests to the server. So the answer is:<\/p>\n<h3>PHP Function: SoapClient<\/h3>\n<p><em>The SoapClient class provides a client for \u00bb SOAP 1.1, \u00bb SOAP 1.2 servers. It can be used in WSDL or non-WSDL mode.<\/em><\/p>\n<h4>Implementation Example:<\/h4>\n<p> $client = new SoapClient(&#8220;http:\/\/www.centrina.com.br\/WSConsumoPortal\/Service.asmx?op=getListaImoveis&#8221;);<br \/>\n<br \/>\n$result = $client-> \/\/here you have to call your desired section from retrieved version of document.<\/p>\n<h5>Tip:<\/h5>\n<p>As we got server response in $client so now you can go as much depth as you want by following the pointer ->1st->2nd->3rd level of depth.<\/p>\n<h6>I hope that you will like the article connect a web service in a php page. As i have written to just to give a little introduction about SoapClient. I will further write it in details, for beginners it is enough to get rid of fear of SOAP, i hope.<\/h6>\n","protected":false},"excerpt":{"rendered":"<p>Connect a web service in a php page Connect a web service in a php page instantly lighten the SOAP in our mind as a first word when we talk about web service in php. In simple words if i explain it to you that how can you call this service or connect this service [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-173","post","type-post","status-publish","format-standard","hentry","category-web-services"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Connect a web service in a php page<\/title>\n<meta name=\"description\" content=\"Connect a web service in a php page\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Connect a web service in a php page\" \/>\n<meta property=\"og:description\" content=\"Connect a web service in a php page\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2011-06-24T00:18:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-19T09:14:24+00:00\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"Connect a web service in a php page\",\"datePublished\":\"2011-06-24T00:18:49+00:00\",\"dateModified\":\"2014-03-19T09:14:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/\"},\"wordCount\":356,\"articleSection\":[\"Web Services\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/\",\"name\":\"Connect a web service in a php page\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"datePublished\":\"2011-06-24T00:18:49+00:00\",\"dateModified\":\"2014-03-19T09:14:24+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"description\":\"Connect a web service in a php page\",\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Development\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Web Services\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/web-services\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Connect a web service in a php page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Connect a web service in a php page","description":"Connect a web service in a php page","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/","og_locale":"en_US","og_type":"article","og_title":"Connect a web service in a php page","og_description":"Connect a web service in a php page","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2011-06-24T00:18:49+00:00","article_modified_time":"2014-03-19T09:14:24+00:00","author":"Fahad","twitter_misc":{"Written by":"Fahad","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"Connect a web service in a php page","datePublished":"2011-06-24T00:18:49+00:00","dateModified":"2014-03-19T09:14:24+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/"},"wordCount":356,"articleSection":["Web Services"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/","name":"Connect a web service in a php page","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"datePublished":"2011-06-24T00:18:49+00:00","dateModified":"2014-03-19T09:14:24+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"description":"Connect a web service in a php page","breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/web-services\/connect-a-web-service-in-a-php-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Development","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/"},{"@type":"ListItem","position":3,"name":"Web Services","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/web-services\/"},{"@type":"ListItem","position":4,"name":"Connect a web service in a php page"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":4007,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=173"}],"version-history":[{"count":5,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/173\/revisions"}],"predecessor-version":[{"id":572,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/173\/revisions\/572"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}