WhiteHatBox
Share Page
Following(0)
Partner(s)
opiniones

Login problem

ReplyThanks 2017/01/27 06:58:41 0 0

Hello,I have a problem API.If I use it directly in a php I have a login error but if I use it from a html form that makes a post call to that php works fine.Any ideas?


function getSpinResult($articulo,$idioma){


$apikey=my api id;
$username=my user;
$pass=my pass;
$spin_type="1";

//Get article from request
$article = $articulo;

//Set parameters default value
if(empty($_REQUEST["orderly"])){
$_REQUEST["orderly"] = 0;
}
if(empty($_REQUEST["UseGrammarAI"])){
$_REQUEST["UseGrammarAI"] = 0;
}
if(empty($_REQUEST["pos"])){
$_REQUEST["pos"] = 0;
}
if(empty($_REQUEST["protecthtml"])){
$_REQUEST["protecthtml"] = 0;
}
if(empty($_REQUEST["spintype"])){
$_REQUEST["spintype"] = 1;
}
if(empty($_REQUEST["not_use_oglword"])){
$_REQUEST["not_use_oglword"] = 0;
}
if(empty($_REQUEST["usehurricane"])){
$_REQUEST["usehurricane"] = 0;
}
if(empty($_REQUEST["chartype"])){
$_REQUEST["chartype"] = 1;
}
if(empty($_REQUEST["convertbase"])){
$_REQUEST["convertbase"] = 0;
}
if(empty($_REQUEST["onecharforword"])){
$_REQUEST["onecharforword"] = 0;
}
if(empty($_REQUEST["percent"])){
$_REQUEST["percent"] = 0;
}
if(empty($_REQUEST["spinhtml"])){
$_REQUEST["spinhtml"] = 0;
}
if(empty($_REQUEST["protecthtml"])){
$_REQUEST["protecthtml"] = "null";
}
if(empty($_REQUEST["protectwords"])){
$_REQUEST["protectwords"] = "null";
}
if(empty($_REQUEST["tagprotect"])){
$_REQUEST["tagprotect"] = "null";
}
if(empty($_REQUEST["rule"])){
$_REQUEST["rule"] = 0;
}
if(empty($_REQUEST["wordquality"])){
$_REQUEST["wordquality"] = 0;
}
if(empty($_REQUEST["thesaurus"])){
$_REQUEST["thesaurus"] = "Italian";
}else{
$_REQUEST["thesaurus"] = "Italian";
}
//$idioma="Italian";
//Get IP address and Port
$address="api.spinnerchief.com:443";
$arr = spilt($address, ':');
$ip = $arr[0];
$port = $arr[1];
if(empty($port))
$port = 443;

//Write whole Url
$url = "/spintype=".$_REQUEST["spintype"]."&spinfreq="
.$_REQUEST["spinfreq"]."&autospin=".$_REQUEST["autospin"]."&original=".$_REQUEST["not_use_oglword"].
"&wordscount=".$_REQUEST["wordscount"]."&usehurricane=".$_REQUEST["usehurricane"]."&chartype="
.$_REQUEST["chartype"]."&convertbase=".$_REQUEST["convertbase"]."&onecharforword=".$_REQUEST["onecharforword"].
"&percent=".$_REQUEST["percent"]."&protecthtml=".$_REQUEST["protecthtml"]."&spinhtml="
.$_REQUEST["spinhtml"]."&orderly=".$_REQUEST["orderly"]."&wordquality="
.$_REQUEST["wordquality"]."&username=".$username."&password=".$pass.
"&apikey="
.$apikey."&protectwords=".$_REQUEST["protectwords"]."&querytimes="
.$_REQUEST["querytimes"]."&replacetype=".$_REQUEST["replacetype"]."&pos=".$_REQUEST["pos"].
"&UseGrammarAI=".$_REQUEST["UseGrammarAI"]."&rule=".$_REQUEST["rule"]."&thesaurus="
.$idioma."&phrasecount=".$_REQUEST["phrasecount"]."&tagprotect="
.$_REQUEST["tagprotect"];

//Send request and return result
//echo "http://".$ip.":".$port.$url, $article."</br></br></br></br>";
return curl_request("http://".$ip.":".$port.$url, $article);


}



function curl_request($url, $data){
$req = curl_init();
curl_setopt($req, CURLOPT_URL, $url);
curl_setopt($req, CURLOPT_RETURNTRANSFER,1);
curl_setopt($req, CURLOPT_POST, true);
curl_setopt($req, CURLOPT_POSTFIELDS, $data);
$result = trim(curl_exec($req));
curl_close($req);
return $result;
}

WhiteHatBox
2017/01/31 09:05:04

Hi, does your username and password contains any special char except number 0-9 and a-z ?

If yes, try to change your password that have only 0-9 and a-z chars, then try again.

Let's ROCK!
<< < 1> >>
VerifyCode
Advanced Option