s_danial_a
یک شنبه 20 مرداد 1392, 13:51 عصر
ک کدی نوشتم که در اون با ارسال دو تا پارامتر به وب سرویس باید یک رشته را بعنوان پاسخ دریافت کنه . در لوکال من این کار و راحت انجام دادم و خیلی سریع می تونم پاسخ رو دریافت کنم . اما متاسفانه در هاست سی پنل که اطلاعات اصلی سایتم هست نمی تونم پاسخ رو درست دریافت کنم پاسخ بصورت یک رشته متنی خالی برام میاد
می خواستم بدونم کسی می تونه تو این زمینه بهم کمک کنه ؟
این هم کدش :
<div class="codeblock phpcodeblock"><div class="title">
<html>
<body>
<form method="post">
<table cellspacing="10" bgcolor="e3e8e7" style="color: #ff002a;">
<tr>
<td style="text-align: left;"><B>سریال 1
: </B><input type="text" name="LKSerial" /></td>
</tr>
<tr>
<td style="text-align: left;"><B>سریال 2 : </B><input type="text" name="SoftSerial" /></td>
</tr>
<tr>
<td style="text-align: left;"><input type="Submit" value="دریافت کد " style="font-family: tahoma;"/></td>
</tr>
<tr>
<td>
<?php
if(isset($_POST['SoftSerial']) && isset($_POST['LKSerial']))
{
$SoftSerial=$_POST['SoftSerial'];
$LKSerial = $_POST['LKSerial'];
require_once('lib/nusoap.php');
if($LKSerial != "" && $SoftSerial!="" )
{
$client = new nusoap_client('http://npsms.ir/activationwebservice.asmx?wsdl', 'wsdl');
$err = $client->getError();
if ($err)
{
echo '<p><b>Error: ' . $err . '</b></p>';
}
$param = array('LKSerial' =>$LKSerial
,'SoftSerial' => $SoftSerial);
$result = $client->call('ActivationCode',array('LKSerial' => $LKSerial , 'SoftSerial'=>$SoftSerial));
?>
<div style="color: #30b90c;">
<?php echo "سریال 1= ".$LKSerial; ?>
<br/>
<?php echo "سریال 2= ".$SoftSerial; ?>
</div>
<br />
<?php echo "کد دریافتی= "; ?>
<b>
<?php
echo $result["ActivationCodeResult"];
}
}
else
{
echo "لطفا سریال ها را وارد نمایید";
}
?>
</b>
</td>
</tr>
</table>
<br/> <br/>
</form>
</body>
</html>
می خواستم بدونم کسی می تونه تو این زمینه بهم کمک کنه ؟
این هم کدش :
<div class="codeblock phpcodeblock"><div class="title">
<html>
<body>
<form method="post">
<table cellspacing="10" bgcolor="e3e8e7" style="color: #ff002a;">
<tr>
<td style="text-align: left;"><B>سریال 1
: </B><input type="text" name="LKSerial" /></td>
</tr>
<tr>
<td style="text-align: left;"><B>سریال 2 : </B><input type="text" name="SoftSerial" /></td>
</tr>
<tr>
<td style="text-align: left;"><input type="Submit" value="دریافت کد " style="font-family: tahoma;"/></td>
</tr>
<tr>
<td>
<?php
if(isset($_POST['SoftSerial']) && isset($_POST['LKSerial']))
{
$SoftSerial=$_POST['SoftSerial'];
$LKSerial = $_POST['LKSerial'];
require_once('lib/nusoap.php');
if($LKSerial != "" && $SoftSerial!="" )
{
$client = new nusoap_client('http://npsms.ir/activationwebservice.asmx?wsdl', 'wsdl');
$err = $client->getError();
if ($err)
{
echo '<p><b>Error: ' . $err . '</b></p>';
}
$param = array('LKSerial' =>$LKSerial
,'SoftSerial' => $SoftSerial);
$result = $client->call('ActivationCode',array('LKSerial' => $LKSerial , 'SoftSerial'=>$SoftSerial));
?>
<div style="color: #30b90c;">
<?php echo "سریال 1= ".$LKSerial; ?>
<br/>
<?php echo "سریال 2= ".$SoftSerial; ?>
</div>
<br />
<?php echo "کد دریافتی= "; ?>
<b>
<?php
echo $result["ActivationCodeResult"];
}
}
else
{
echo "لطفا سریال ها را وارد نمایید";
}
?>
</b>
</td>
</tr>
</table>
<br/> <br/>
</form>
</body>
</html>