monkeynote Posted August 6, 2008 Share Posted August 6, 2008 hello guys! Im new to PHP world and i am trying to migrate my skillset into open source world. with my quest on open source programming, i've learned some basics in PHP like string and data manipulation. i would like to create Web Service just like in asp.net. Where can i find some tools / tutorials to be used in order for me to learn how to create web service in PHP. Thanks for reading my post guys! Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted August 6, 2008 Share Posted August 6, 2008 First, what are the things you actually want to be able to do in your web service? ---------------- Now playing: Enter Shikari - Adieu via FoxyTunes Quote Link to comment Share on other sites More sharing options...
chronister Posted August 6, 2008 Share Posted August 6, 2008 Well the only tools you need really are notepad, your brain and your hands. I guess a webserver to host the php pages would be a big plus in this endeavor too What type of web app are you trying to create? Quote Link to comment Share on other sites More sharing options...
monkeynote Posted August 7, 2008 Author Share Posted August 7, 2008 thanks for the reply guys! i already have XAMPP configured on my pc and the webserver is up and running i am planning to create a simple user log in that will pass "OK" if successful or "ER" if unsuccessful. i would like to pass studentid to a webservice (PHP) that will return a recordset / array of schedules that will be queried by a remote application created in vb / vb.net / c# here is a simple diagram. Remote Desktop Application <-> web service (PHP) <-> MySQL Database (vb / vb.net / c#) i hope that you can guide me with my quest in learning how to create webservice in PHP Quote Link to comment Share on other sites More sharing options...
monkeynote Posted August 8, 2008 Author Share Posted August 8, 2008 Help me guys! i dont know where to start my quest in creating PHP Web Service. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 8, 2008 Share Posted August 8, 2008 Any idea of which kind of web service you want? (XML-RPC, SOAP, REST) Quote Link to comment Share on other sites More sharing options...
libertyct Posted August 8, 2008 Share Posted August 8, 2008 Any idea of which kind of web service you want? (XML-RPC, SOAP, REST) i agree with darkwater, first thing is deciding on what type of service u want to work with, i would recommend SOAP, based on the job postings i have seen recently. Quote Link to comment Share on other sites More sharing options...
monkeynote Posted August 9, 2008 Author Share Posted August 9, 2008 Thanks for the reply guys! Sorry about my last post. i am not aware that aside from SOAP, there are also XML-RPC and REST Web Services. I would like to create a SOAP in PHP. I hope that i can create a web service in PHP and im excited to learn new in the open source world Quote Link to comment Share on other sites More sharing options...
monkeynote Posted August 14, 2008 Author Share Posted August 14, 2008 hello guys! i tried NuSOAP in EasyPHP running on thumbdrive but my problem is i can't figure out this error message <b>Notice</b>: Undefined variable: HTTP_RAW_POST_DATA in <b>Z:\EasyPHP\NuSOAP\Server.php</b> on line <b>22</b><br /> i also change my PHP.ini file to enable HTTP_RAW_POST_DATA ; Always populate the $HTTP_RAW_POST_DATA variable. always_populate_raw_post_data = On i also restarted the apache server to reread my php.ini file but still i encounter the same error i also double checked it by viewing <?php phpinfo(); ?> and it indicates that the always_populate_raw_post_data is ON. here is the NuSOAP Sample Code <?php //call library require_once ('lib/nusoap.php'); //using soap_server to create server object $server = new soap_server; //register a function that works on server $server->register('hello'); // create the function function hello($name) { if(!$name){ return new soap_fault('Client','','Put your name!'); } $result = "Hello, ".$name; return $result; } // create HTTP listener // i also tried this one but another error occurs // err: <b>Notice</b>: Undefined index: content-type in <b>Z:\EasyPHP\NuSOAP\lib\nusoap.php</b> on line <b>4209</b><br /> // $HTTP_RAW_POST_DATA=isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:''; // $HTTP_RAW_POST_DATA=isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:file_get_contents("php://input"); $server->service($HTTP_RAW_POST_DATA); // <-------- error in raw post data exit(); ?> what is wrong with my configuration? is there any solution for this problem? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.