پارامترهای ورودی
|
|
|
---|---|---|
نام کاربری
|
Char
|
Uname
|
پسورد
|
Char
|
Pass
|
ID شغل اصلی
|
Char
|
jobsid
|
jobstrendlist
|
Char
|
OP
|
دریافت گرایش بانک مشاغل
فایل مورد بحث : jobsTrendResponse
خطا : The username or password is incorrect مربوط به اشتباه بودن نام کاربری یا رمز عبور می باشد.
مشاهده نمونه کدها
[php]
<?php $url = "https://ippanel.com/services.jspd"; $param = array ( ‘uname’=>”,
‘pass’=>”,
‘jobsid’=>”,
‘op’=>’jobstrendlist’
);
$handler = curl_init($url);
curl_setopt($handler, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($handler, CURLOPT_POSTFIELDS, $param);
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
$response2 = curl_exec($handler);
$response2 = json_decode($response2);
$res_code = $response2[0];
$res_data = $response2[1];
echo $res_data;
?>
[/php]
[php]</pre>
WebRequest request = WebRequest.Create("http://ippanel.com/services.jspd");
request.Method = "POST";
string postData = "op=jobstrendlist&uname=&pass=&jobsid=";
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
WebResponse response = request.GetResponse();
Console.WriteLine(((HttpWebResponse)response).StatusDescription);
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
Console.WriteLine(responseFromServer);
reader.Close();
dataStream.Close();
response.Close();
System.Diagnostics.Debug.WriteLine(responseFromServer);
<pre>[/php]
</p>