Ben bir PHP web sayfasından kamuya açık bir web hizmetini çağırmak için çalışıyorum.
Web servisi: http://www.webservicex.net/uszip.asmx?WSDL
My code:
<html>
<body>
<?php
$zip = $_REQUEST['zip'];
echo 'zip is'.$zip;
?>
<form action="wszip.php" method="post">
<table cellspacing="10" bgcolor="CadetBlue">
<tr>
<td><B>Enter Zip Code : </B><input type="text" name="zip" /></td>
<td></td>
<td><input type="Submit" value="Find It!"/></td>
</tr>
</table>
<BR><BR><BR><BR>
</form>
<?php
if($zip != "")
{
$wsdl = "http://www.webservicex.net/uszip.asmx?WSDL";
$client = new soapclient($wsdl, true);
$response = $client->GetInfoByZIP($zip);
}
?>
</body>
</html>