I am using web services to get the parameter from SOAP client successfully. I want to pass this parameters in url through html form so that i can connect to my system with this parameters. I have 2 functions. Function login() is to set the parameters for the connection from SOAP client and function getVehicle() to get this parameters. In getVehicle() i want to send the parameters user, hash password, dealer_number, corporate_group_id to client.php from url. And this parameters i want to send from form action without submit button.
index.php
function login()
{
$wsdl = 'http://www.schwackenet.de/awonline/de/service2/SNWebService.php?wsdl';
$options = array('trace' => true);
$params = array(
'user' => utf8_encode('deshmukh'),
'password' => utf8_encode('deshmukh'),
'corporate_group_id' => '101',
'dealer_number' => 'INT31303',
'dms_id' => 'A13T2D19',
'dms_image_url' => '',
'dms_keepalive_url' => '',
'dms_followup_url' => ''
);
$client = new SoapClient($wsdl, $options);
$result = $client->Login($params);
return $return;
}
if($parameter['aktion'] == 'getVehicle')
{
//var_dump(Login());
$vehicle=login();
$user_login=$vehicle['user'];
$password=$vehicle['password'];
$dealer_no=$vehicle['dealer_number'];
$group_id=$vehicle['corporate_group_id'];
//form action here
}
You can have the data transferred to your client.php
as a GET request using the built-in php function file_get_contents()
like this:
if ($parameter['aktion'] == 'getVehicle')
{
$vehicle=login();
$user_login=$vehicle['user'];
$password=$vehicle['password'];
$dealer_no=$vehicle['dealer_number'];
$group_id=$vehicle['corporate_group_id'];
// send the data to your system
$system_url = 'http://yoursite.com/path/to/client.php';
header("Location: $system_url?user=$user_login&password=$password&dealer_number=$dealer_no&corporate_group_id=$group_id");
exit();
}
If you want, you can have client.php
reurn a "success" or "error" output and you'll have it on the $response
variable and you can log it or do something else with it.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments