Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > บทความจากสมาชิก > การทำ Login Form และ Update MySQL Data ผ่าน Web Service ด้วย PHP (NuSoap)



 
Clound SSD Virtual Server

การทำ Login Form และ Update MySQL Data ผ่าน Web Service ด้วย PHP (NuSoap)

การทำ Login Form และ Update MySQL Data ผ่าน Web Service ด้วย PHP (NuSoap) จากหัวข้อก่อน ๆ เราได้ได้ศึกษา PHP กับ Web Service หลาย ๆ รูปแบบแล้ว บทความนี้จะเป็นขั้น Advacned ขึ้นมาอีกนิดหนึ่ง โดยการนำ Web Service มาใช้ร่วมกับ การทำ Login Form การนำข้อมูลของลูกค้าที่อยู่ใน Web Service ฝั่ง Server มาแสดงในหน้าเว็บของ Client และการส่งข้อมูลเพื่อ Update ไปยัง Web Service ฝั่ง Server ซึ่งจะใช้ MySQL Database ในการจัดเก็บข้อมูล ในบทความนี้ใช้ Library ตัวเดิมคือ NuSoap สำหรับใครจะอ่านบทความนี้ แนะนำให้กลับไปอ่านหัวข้อ PHP Web Service กับ Array และ PHP Web Service กับ MySQL Database ซะก่อน

Screenshot

PHP Web Service Login Form and Update MySql Data

หน้าจอ Login ข้อมูล ซึ่งจะตรวจสอบข้อมูลจาก Web Service

PHP Web Service Login Form and Update MySql Data

หน้าจอดึงข้อมูล ซึ่งจะดึงข้อมุลผ่าน Web Service

PHP Web Service Login Form and Update MySql Data

หน้าจอสำหรับแก้ไขข้อมูล ซึ่งข้อมูลที่แก้ไขจะถูกส่งไป Update ที่ Web Service ฝั่ง Server


คำอธิบาย
สำหรับตัวอย่างนี้จะยกตัวอย่างเกี่ยวกับข้อมูลในตาราง MySQL ชื่อว่า customer ซึ่งจัดเก็บ CustomerID, Username, Password, Email, CountryCode, Budget, Used ซึ่งเปิดบริการ Service ไว้ 3 ตัวคือ

http://localhost/nusoap/WebServiceServer_Login.php?wsdl
(ใช้ตรวจสอบการ Login ของ Client)

http://localhost/nusoap/WebServiceServer_Show.php?wsdl
(ใช้สำหรับส่งข้อมูลรายละเอียดของลูกค้าไปยัง Client)

http://localhost/nusoap/WebServiceServer_Save.php?wsdl
(ใช้สำหรับ Update ข้อมูลจาก Client เมื่อมีการแก้ไขและส่งข้อมูลใหม่มายัง Web Service ฝั่ง Server)


โดย User ในฝั่ง Client สามารถเขียน Web Service เพื่อตรวจสอบข้อมูล Username และ Password ผ่าน Form และเมื่อ Login ผ่าน ฝั่ง Client สามารถทำการเรียกข้อมูลรายละเอียดต่าง ๆ ของลูกค้า รวมทั้ง สามารถทำการแก้ไขข้อมูลใหม่ และส่งข้อมูลใหม่มายัง Web Service ฝั่ง Server ได้ (ดูภาพประกอบเพื่อความเข้าใจ)

ก่อนอ่านบทความนี้ควรอ่าน 2 บทความนี้ก่อน


ฐานข้อมูลฝั่ง Server
CREATE TABLE `customer` (
  `CustomerID` varchar(4) NOT NULL,
  `Username` varchar(30) NOT NULL,
  `Password` varchar(30) NOT NULL,
  `Name` varchar(50) NOT NULL,
  `Email` varchar(50) NOT NULL,
  `CountryCode` varchar(2) NOT NULL,
  `Budget` double NOT NULL,
  `Used` double NOT NULL,
  PRIMARY KEY  (`CustomerID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table `customer`
-- 

INSERT INTO `customer` VALUES ('C001', 'win', 'win001', 'Win Weerachai', '[email protected]', 'TH', 1000000, 600000);
INSERT INTO `customer` VALUES ('C002', 'john', 'john002', 'John  Smith', '[email protected]', 'EN', 2000000, 800000);
INSERT INTO `customer` VALUES ('C003', 'jame', 'jame003', 'Jame Born', '[email protected]', 'US', 3000000, 600000);
INSERT INTO `customer` VALUES ('C004', 'chalee', 'chalee004', 'Chalee Angel', '[email protected]', 'US', 4000000, 100000);


นำคำสั่ง SQL นี้ไปสร้าง Database ในฝั่งของ Web Service Server

PHP Web Service Login Form and Update MySql Data

เมื่อสร้างเสร็จจะได้โครงสร้างและข้อมูลดังรูป


สำหรับบทความนี้ใช้ Library ของ NuSoap สามารถดาวน์โหลดได้ที่









Code เต็ม ๆ

Web Service ฝั่ง Server

WebServiceServer_Login.php ใช้ตรวจสอบการ Login ของ Client
<?php
		require_once("lib/nusoap.php");
		 
		//Create a new soap server
		$server = new soap_server();
		 
		//Define our namespace
		$namespace = "http://localhost/nusoap/WebServiceServer_Login.php";
		$server->wsdl->schemaTargetNamespace = $namespace;
		 
		//Configure our WSDL
		$server->configureWSDL("CustomerLogin");
		 
		//Register our method and argument parameters
        $varname = array(
                   'strUsername' => "xsd:string",
				   'strPassword' => "xsd:string"
        );
		
		// Register service and method
		$server->register('chkCustomerLogin',$varname, array('return' => 'tns:ArrayOfString'));
		
		//Add ComplexType with Array
		$server->wsdl->addComplexType("ArrayOfString", 
						 "complexType", 
						 "array", 
						 "", 
						 "SOAP-ENC:Array", 
						 array(), 
						 array(array("ref"=>"SOAP-ENC:arrayType","wsdl:arrayType"=>"xsd:string[]")), 
						 "xsd:string");  
		 
		function chkCustomerLogin($strUsername,$strPassword)
		{

				$objConnect = mysql_connect("localhost","root","") or die(mysql_error());
				$objDB = mysql_select_db("mydatabase");
				$strSQL = "
					SELECT * FROM customer WHERE 1  
					AND Username = '".$strUsername."'
					AND Password = '".$strPassword."'
				";
				$objQuery = mysql_query($strSQL) or die (mysql_error());
				$objResult = mysql_fetch_array($objQuery);
				if($objResult)
				{
					$arr[0] = true;
					$arr[1] = $objResult["CustomerID"];
					$arr[2] = null;
				}
				else
				{
					$arr[0] = false;
					$arr[1] = null;
					$arr[2] = "Invalid username or password";
				}
				
				/***
					$arr[0] // Return Status Login false or true
					$arr[1] // Return CustomerID
					$arr[2] // Return Error Message
				*/
				mysql_close($objConnect);

				return $arr;
		}
		 
		// Get our posted data if the service is being consumed
		// otherwise leave this data blank.
		$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
		 
		// pass our posted data (or nothing) to the soap service
		$server->service($POST_DATA);
		exit(); 
?>


WebServiceServer_Show.php ใช้สำหรับส่งข้อมูลรายละเอียดของลูกค้าไปยัง Client
<?php
		require_once("lib/nusoap.php");
		 
		//Create a new soap server
		$server = new soap_server();
		 
		//Define our namespace
		$namespace = "http://localhost/nusoap/WebServiceServer_Show.php";
		$server->wsdl->schemaTargetNamespace = $namespace;
		
		//Configure our WSDL
		$server->configureWSDL("getCustomer");
		
		//Add ComplexType
		$server->wsdl->addComplexType( 
			'DataList', 
			'complexType', 
			'struct', 
			'all', 
			'', 
			   array( 
					'CustomerID' => array('name' => 'CustomerID', 'type' => 'xsd:string'), 
					'Username'  => array('name' => 'Username', 'type'  => 'xsd:string'),
					'Password'  => array('name' => 'Password', 'type'  => 'xsd:string'),
					'Name'  => array('name' => 'Name', 'type'  => 'xsd:string'),
					'Email'  => array('name' => 'Email', 'type'  => 'xsd:string'),
					'CountryCode'  => array('name' => 'CountryCode', 'type'  => 'xsd:string'),
					'Budget'  => array('name' => 'Budget', 'type'  => 'xsd:float'),
					'Used'  => array('name' => 'Used', 'type'  => 'xsd:float')
		   ) 
		); 
		
		//Add ComplexType
		$server->wsdl->addComplexType( 
			'DataListResult', 
			'complexType', 
			'array', 
			'', 
			'SOAP-ENC:Array', 
			array(), 
			array( 
				array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:DataList[]') 
			), 
			'tns:DataList' 
		); 

		//Register our method and argument parameters
        $varname = array(
                   'strCustomerID' => "xsd:string"
        );
		
		// Register service and method
		$server->register('resultCustomer',    // method name 
			$varname, // input parameters 
			array('return' => 'tns:DataListResult')); 

		 
		function resultCustomer($strCustomerID)
		{
				$objConnect = mysql_connect("localhost","root","") or die(mysql_error());
				$objDB = mysql_select_db("mydatabase");
				$strSQL = "SELECT * FROM customer WHERE 1 AND CustomerID = '".$strCustomerID."' ";
				$objQuery = mysql_query($strSQL) or die (mysql_error());
				$intNumField = mysql_num_fields($objQuery);
				$resultArray = array();
				while($obResult = mysql_fetch_array($objQuery))
				{
					$arrCol = array();
					for($i=0;$i<$intNumField;$i++)
					{
						$arrCol[mysql_field_name($objQuery,$i)] = $obResult[$i];
					}
					array_push($resultArray,$arrCol);
				}
				mysql_close($objConnect);
				return $resultArray;
		}
		 
		// Get our posted data if the service is being consumed
		// otherwise leave this data blank.
		$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
		 
		// pass our posted data (or nothing) to the soap service
		$server->service($POST_DATA);
		exit(); 
?>


WebServiceServer_Save.php ใช้สำหรับ Update ข้อมูลจาก Client เมื่อมีการแก้ไขและส่งข้อมูลใหม่มายัง Web Service ฝั่ง Server
<?php
		require_once("lib/nusoap.php");
		 
		//Create a new soap server
		$server = new soap_server();
		 
		//Define our namespace
		$namespace = "http://localhost/nusoap/WebServiceServer_Save.php";
		$server->wsdl->schemaTargetNamespace = $namespace;
		 
		//Configure our WSDL
		$server->configureWSDL("UpdateCustomer");
		 
		//Register our method and argument parameters
        $varname = array(
                   'strCustomerID' => "xsd:string",
				   'strPassword' => "xsd:string",
				   'strName' => "xsd:string",
				   'strEmail' => "xsd:string",
				   'strCountryCode' => "xsd:string",
				   'strBudget' => "xsd:float",
				   'strUsed' => "xsd:float"
        );
		
		// Register service and method
		$server->register('saveUpdateCustomer',$varname, array('return' => 'tns:ArrayOfString'));
		
		//Add ComplexType with Array
		$server->wsdl->addComplexType("ArrayOfString", 
						 "complexType", 
						 "array", 
						 "", 
						 "SOAP-ENC:Array", 
						 array(), 
						 array(array("ref"=>"SOAP-ENC:arrayType","wsdl:arrayType"=>"xsd:string[]")), 
						 "xsd:string");  
		
		 //Method update
		function saveUpdateCustomer($strCustomerID,
			$strPassword,
			$strName,
			$strEmail,
			$strCountryCode,
			$strBudget,
			$strUsed)
		{

				$objConnect = mysql_connect("localhost","root","") or die(mysql_error());
				$objDB = mysql_select_db("mydatabase");
				$strSQL = "
					UPDATE customer SET
						Password = '".$strPassword."',
						Name = '".$strName."',
						Email = '".$strEmail."',
						CountryCode = '".$strCountryCode."',
						Budget = '".$strBudget."',
						Used = '".$strUsed."'
					WHERE CustomerID = '".$strCustomerID."'
				";
				$objQuery = mysql_query($strSQL);
				if($objQuery)
				{
					$arr[0] = true;
					$arr[1] = null;
				}
				else
				{
					$arr[0] = false;
					$arr[1] = mysql_error();
				}
				/***			
					$arr[0] // Return Status Update
					$arr[1] // Return Error Message
				*/
				mysql_close($objConnect);

				return $arr;
		}
		 
		// Get our posted data if the service is being consumed
		// otherwise leave this data blank.
		$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
		 
		// pass our posted data (or nothing) to the soap service
		$server->service($POST_DATA);
		exit(); 
?>














Web Service ฝั่ง Client

สร้างไฟล์สำหรับ Client เพื่อทดสอบเรียก Web Sevice

WebServiceClient_Login.php ใช้สำหรับ Form Login ในการ Request ตรวจสอบ Username และ Password
<?php
ob_start();
session_start();
session_destroy();

session_start();
?>

<html>
<head>
<title>ThaiCreate.Com</title>
</head>
<body>

<form action="?Action=Login" method="post" name="frmMain" id="frmMain">
  Login Form <br>

  <?php
	if($_GET["Action"] == "Login")
	{
		include("lib/nusoap.php");
        $client = new nusoap_client("http://localhost/nusoap/WebServiceServer_Login.php?wsdl",true); 
        $params = array(
                   'strUsername' => $_POST["txtUsername"],
				   'strPassword' => $_POST["txtPassword"]
        );
		$data = $client->call("chkCustomerLogin",$params); 
		if($data[0] == true)
		{
			$_SESSION["strCustomerID"] = $data[1];
			header("location:WebServiceClient_Show.php");
		}
		else
		{
			echo "<font color='red'>".$data[2]."</font>";
			$_SESSION["strCustomerID"] = null;
		}
	}
  ?>

  <table width="374" border="1" cellpadding="2" cellspacing="2">
    <tr>
      <td width="89">Username</td>
      <td width="144"><input name="txtUsername" type="text" id="txtUsername"></td>
    </tr>
    <tr>
      <td>Password</td>
      <td><input name="txtPassword" type="password" id="txtPassword"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input name="btnLogin" type="submit" id="btnLogin" value="Login">
		<input name="btnReset" type="reset" id="btnReset" value="Reset"></td>
    </tr>
  </table>
</form>

</body>
</html>


Screenshot

PHP Web Service Login Form and Update MySql Data

หน้าจอตรวจสอบ Username และ Password โดยจะส่งข้อมูลไปตรวจสอบยัง Web Service ฝั่ง Server

PHP Web Service Login Form and Update MySql Data

กรณีที่ Login ไม่ถูกต้อง จะมีการแสดง Error message ที่ถูกส่งมายัง Web Service ฝั่ง Server


WebServiceClient_Show.php ใช้สำหรับดึงข้อมูลที่อยู่ใน Web Service ฝั่ง Server มาแสดง
<?php
session_start();
if($_SESSION["strCustomerID"] == "")
{
	header("location:WebServiceClient_Login.php");
	exit();
}
?>

<html>
<head>
<title>ThaiCreate.Com</title>
</head>
<body>

<?php
		include("lib/nusoap.php");
		$client = new nusoap_client("http://localhost/nusoap/WebServiceServer_Show.php?wsdl",true); 
		$params = array(
				   'strCustomerID' => $_SESSION["strCustomerID"]
		);
		$data = $client->call('resultCustomer', $params);
?>

Welcome <b><?php echo $data[0]["Name"];?></b>..... Your information.<br><br>
  <table width="374" border="1" cellpadding="2" cellspacing="2">
    <tr>
      <td width="89">CustomerID</td>
      <td width="144"><?php echo $data[0]["CustomerID"];?></td>
    </tr>
    <tr>
      <td width="89">Username</td>
      <td width="144"><?php echo $data[0]["Username"];?></td>
    </tr>
    <tr>
      <td width="89">Password</td>
      <td width="144"><?php echo $data[0]["Password"];?></td>
    </tr>
    <tr>
      <td width="89">Name</td>
      <td width="144"><?php echo $data[0]["Name"];?></td>
    </tr>
    <tr>
      <td width="89">Email</td>
      <td width="144"><?php echo $data[0]["Email"];?></td>
    </tr>
    <tr>
      <td width="89">CountryCode</td>
      <td width="144"><?php echo $data[0]["CountryCode"];?></td>
    </tr>
    <tr>
      <td width="89">Budget</td>
      <td width="144"><?php echo $data[0]["Budget"];?></td>
    </tr>
    <tr>
      <td width="89">Used</td>
      <td width="144"><?php echo $data[0]["Used"];?></td>
    </tr>
  </table>
  <br>
  <a href="WebServiceClient_Profile.php">Edit Your Profile</a>
  |
  <a href="WebServiceClient_Login.php">Logout</a>

<?php
	$data = null;
?>
</body>
</html>


Screenshot

PHP Web Service Login Form and Update MySql Data

หลังจาก Login ผ่านจะมีการเก็บ CustomerID ลงในตัวแปร Session และหลังจากนั้นก็จะ redirect มายังหน้า WebServiceClient_Show.php โดยหน้านี้จะเรียก Web Service ของ Server เพื่อดึงรายละเอียดของลูกค้ามาแสดง (ตามตัวอย่าง) ลองคลิกที่ Edit Your Profile เพื่อแก้ไขข้อมูล


WebServiceClient_Profile.php หน้าจอสำหรับดึงข้อมูลจาก Web Service ฝั่ง Server เพื่อรอการแก้ไข
<?php
session_start();
if($_SESSION["strCustomerID"] == "")
{
	header("location:WebServiceClient_Login.php");
	exit();
}
?>

<html>
<head>
<title>ThaiCreate.Com</title>
</head>
<body>

<form action="WebServiceClient_Save.php" method="post" name="frmMain" id="frmMain">
<?php
		include("lib/nusoap.php");
		$client = new nusoap_client("http://localhost/nusoap/WebServiceServer_Show.php?wsdl",true); 
		$params = array(
				   'strCustomerID' => $_SESSION["strCustomerID"]
		);
		$data = $client->call('resultCustomer', $params);
?>

Update Profile for : <b><?php echo $data[0]["Name"];?></b>..... <br><br>
	
  <table width="374" border="1" cellpadding="2" cellspacing="2">
    <tr>
      <td width="89">CustomerID</td>
      <td width="144"><?php echo $data[0]["CustomerID"];?>
	  <input name="txtCustomerID" type="hidden" id="txtCustomerID" value="<?php echo $data[0]["CustomerID"];?>">
	  </td>
    </tr>
    <tr>
      <td width="89">Username</td>
      <td width="144"><?php echo $data[0]["Username"];?></td>
    </tr>
    <tr>
      <td width="89">Password</td>
      <td width="144"><input name="txtPassword" type="password" id="txtPassword" value="<?php echo $data[0]["Password"];?>"></td>
    </tr>
    <tr>
      <td width="89">Name</td>
      <td width="144"><input name="txtName" type="text" id="txtName" value="<?php echo $data[0]["Name"];?>"></td>
    </tr>
    <tr>
      <td width="89">Email</td>
      <td width="144"><input name="txtEmail" type="text" id="txtEmail" value="<?php echo $data[0]["Email"];?>"></td>
    </tr>
    <tr>
      <td width="89">CountryCode</td>
      <td width="144"><input name="txtCountryCode" type="text" id="txtCountryCode" value="<?php echo $data[0]["CountryCode"];?>"></td>
    </tr>
    <tr>
      <td width="89">Budget</td>
      <td width="144"><input name="txtBudget" type="text" id="txtBudget" value="<?php echo $data[0]["Budget"];?>"></td>
    </tr>
    <tr>
      <td width="89">Used</td>
      <td width="144"><input name="txtUsed" type="text" id="txtUsed" value="<?php echo $data[0]["Used"];?>"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input name="btnSubmit" type="submit" id="btnSubmit" value="Save">
		<input name="btnReset" type="reset" id="btnReset" value="Reset"></td>
    </tr>
  </table>
  <br>

<?php
	$data = null;
?>
</form>
</body>
</html>


Screenshot

PHP Web Service Login Form and Update MySql Data

หน้าจอนี้สำหรับดึงข้อมูลผ่าน Web Service ที่อยู่ในฝั่ง Server มาใส่ใน Form เพื่อรอการแก้ไข ในตัวอย่างจะลองแก้ไขข้อมูล Name ของลูกค้า



WebServiceClient_Save.php เป็นไฟล์สำหรับรับข้อมูลจาก Form แก้ไข และส่ง Update ข้อมูลไปที่ Web Service ฝั่ง Server
<?php
session_start();
if($_SESSION["strCustomerID"] == "")
{
	header("location:WebServiceClient_Login.php");
	exit();
}
?>

<html>
<head>
<title>ThaiCreate.Com</title>
</head>
<body>

  <?php
		include("lib/nusoap.php");
        $client = new nusoap_client("http://localhost/nusoap/WebServiceServer_Save.php?wsdl",true); 
        $params = array(
                   'strCustomerID' => $_POST["txtCustomerID"],
				   'strPassword' => $_POST["txtPassword"],
				   'strName' => $_POST["txtName"],
				   'strEmail' => $_POST["txtEmail"],
				   'strCountryCode' => $_POST["txtCountryCode"],
				   'strBudget' => $_POST["txtBudget"],
				   'strUsed' => $_POST["txtUsed"]
        );
		$data = $client->call("saveUpdateCustomer",$params); 

		if($data[0] == true)
		{
			echo "Update Successfully ... <a href='WebServiceClient_Show.php'>Back to menu</a>";
		}
		else
		{
			echo "Update Failed error...".$data[1];
		}

  ?>

</body>
</html>


Screenshot

จาก Code จะเห็นว่ามีการ Call ตัว Web Service ฝั่ง Server และส่งค่าต่าง ๆ ไป Update ที่ฝั่ง Server

PHP Web Service Login Form and Update MySql Data

กรณีที่ Update ผ่านโปรแกรมจะส่งค่ามาเป็น true จากใน code เขียนเงื่อนไขให้แสดงดังภาพ

PHP Web Service Login Form and Update MySql Data

กรณีที่ Error ทางฝั่ง Web Service Server ก็มีการ return ค่า error message แล้วแต่ว่าจะ error อะไร สามารถเขียนเงื่อนไขเพิ่มได้ที่ไฟล์ (WebServiceServer_Save.php)

PHP Web Service Login Form and Update MySql Data

หลังจากที่ Update เสร็จ ก็จะเห็นข้อมูลเปลี่ยนแลงดังรูป

PHP Web Service Login Form and Update MySql Data

เมื่อกลับไปดู MySQL Database ผ่าน phpMyAdmin ของ Web Service ฝั่ง Server ก็จะเห็นว่าข้อมูลที่แก้ไขได้ถูกเปลี่ยนแปลงไป

สรุป
จากบทความนี้ถ้าอ่านจบแล้วเข้าใจเราจะเห็นว่าการเขียน Web Service สามารถนำ idea ไปพัฒนาปรแกรมต่าง ๆ ได้มากมาย เพราะในปัจจุบันการแลกเปลี่ยนข้อมูลผ่าน Web Service มีความจำเป็นต่อการพัฒนาโปรแกรมในรูปแบบใหม่ ๆ ได้อย่างดี เพราะจะเป็นช่องทางการแชร์หรือใช้ข้อมูลร่วมกัน เช่น ในอนาคตเราอาจจะได้เรียกใช้ Web Service ข้อมูลประชากร ข้อมูลทางราชการที่สามารถเผยแพร่ได้ รวมทั้งข้อมูลของหน่วยงานต่าง ๆ ที่จะสามารถเปิดให้บุคคลอื่น ๆ เข้าไปดึงมาใช้ได้ และ Web Service ไม่ได้แค่ดึงข้อมูลมาแสดงเท่านั้น แต่ Web Service สามารถสั่งให้ฝั่ง Server กระทำการอื่น ๆ ได้เช่นเดียวกัน แต่ทั้งนี้ก็จะต้องขึ้นอยู่กับฝั่ง Server ว่าได้มีการออกแบบ Method หรือ Service ให้กระทำสิ่งใดบ้าง


Download Code !!

บทความอื่น ๆ ที่เกี่ยวข้อง
Go to : วิธีการสร้าง PHP กับ Web Service และ Return Array ไปยัง Client ด้วย NuSoap
Go to : PHP - Web Service กับ MySQL รับส่งค่าผ่าน Web Service กับ MySQL (NuSoap)
Go to : PHP Create - Call Web Service สร้างและเรียกเว็บเซอร์วิส ด้วย PHP (NuSoap and Soap)
Go to : PHP สร้าง Web Service และใช้ .NET เรียก Web Service ของ PHP (ASP.NET and Windows Form)
Go to : วิธีการสร้าง PHP กับ Web Service และ Return Array ไปยัง Client ด้วย NuSoap
Go to : php กับ web service ขอคำปรึกษาเรื่องการ return array ใน webservice ครับ


   
Share
Bookmark.   

  By : TC Admin
  Article : บทความเป็นการเขียนโดยสมาชิก หากมีปัญหาเรื่องลิขสิทธิ์ กรุณาแจ้งให้ทาง webmaster ทราบด้วยครับ
  Score Rating :
  Create Date : 2012-05-21
  Download : No files
Sponsored Links
ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 02
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่