1 | <?php |
||||
2 | /* |
||||
3 | * $Id: sslclient.php,v 1.1 2004/01/09 03:23:42 snichol Exp $ |
||||
4 | * |
||||
5 | * SSL client sample. |
||||
6 | * |
||||
7 | * Service: SOAP endpoint |
||||
8 | * Payload: rpc/encoded |
||||
9 | * Transport: https |
||||
10 | * Authentication: none |
||||
11 | */ |
||||
12 | require_once('../lib/nusoap.php'); |
||||
13 | $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : ''; |
||||
14 | $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : ''; |
||||
15 | $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : ''; |
||||
16 | $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : ''; |
||||
17 | $client = new soapclient('https://arcweb.esri.com/services/v2/AddressFinder', false, |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
18 | $proxyhost, $proxyport, $proxyusername, $proxypassword); |
||||
0 ignored issues
–
show
The call to
soapclient::__construct() has too many arguments starting with $proxyhost .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. ![]() |
|||||
19 | $err = $client->getError(); |
||||
20 | if ($err) { |
||||
21 | echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; |
||||
22 | } |
||||
23 | $result = $client->call('getVersion', array(), 'http://arcweb.esri.com/v2', 'getVersion'); |
||||
24 | if ($client->fault) { |
||||
0 ignored issues
–
show
|
|||||
25 | echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>'; |
||||
26 | } else { |
||||
27 | $err = $client->getError(); |
||||
28 | if ($err) { |
||||
29 | echo '<h2>Error</h2><pre>' . $err . '</pre>'; |
||||
30 | } else { |
||||
31 | echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; |
||||
32 | } |
||||
33 | } |
||||
34 | echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; |
||||
0 ignored issues
–
show
|
|||||
35 | echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>'; |
||||
0 ignored issues
–
show
|
|||||
36 | echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>'; |
||||
0 ignored issues
–
show
|
|||||
37 | ?> |
||||
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. ![]() |
|||||
38 |