How to create a web service with PHP ???

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
Lexus IS
Forum Newbie
Posts: 2
Joined: Thu Feb 26, 2009 2:51 pm

How to create a web service with PHP ???

Post by Lexus IS »

Hi,

I need help about how to create a web service using PHP.
Please help me, with a simple example is all for me.

thanks..
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: How to create a web service with PHP ???

Post by alex.barylski »

http://www.whatever.com/test.php

Code: Select all

<?php
 
  echo 'hello wrold';
 
From another server have a script do this:

Code: Select all

 
<?php
  echo file_get_contents('http://www.whatever.com/test.php');
 
That is all there is to a very basic web service. Go read up on REST/SOAP and XML as those are what you really need to learn if you are to fully appreciate web services.
Lexus IS
Forum Newbie
Posts: 2
Joined: Thu Feb 26, 2009 2:51 pm

Re: How to create a web service with PHP ???

Post by Lexus IS »

Thanks PCSpectra for your help.
If you have other example more advanced, please post it.

Thanks!!!!!
Post Reply