user [email protected]
2020-09-30 14:58:55

Hello, 

Thank you for the great API.

Just want to report a bug, the SpinnerChief API is not working if this character (for example) is passed in the POST request:


Example:

[30-Sep-2020 06:52:38 UTC] http://api.spinnerchief.com:443/apikey=api2409357d02fa474d8&username=kisded&password=Szabolcs1&spinfreq=2&Wordscount=6&wordquality=0&tagprotect=[]&original=0&thesaurus=English&replacetype=0&chartype=1&convertbase=0 

WITH POST REQUEST: Stimulus check money: Everything we know about how large your second relief payment may be     - CNET [19459000] Congress might finalize a deal on a new relief package soon. Here's what we know about the possible size of a future direct payment and how the IRS could send it.(*******), (*****) 8: (******) PM(*)(**)Read More(***)<br/>

(WORKING)


[30-Sep-2020 06:53:06 UTC] http://api.spinnerchief.com:443/apikey=api2409357d02fa474d8&username=kisded&password=Szabolcs1&spinfreq=2&Wordscount=6&wordquality=0&tagprotect=[]&original=0&thesaurus=English&replacetype=0&chartype=1&convertbase=0 

WITH POST REQUEST: Stimulus check money: Everything we know about how large your second relief payment may be     - CNET [19459000] Congress might finalize a deal on a new relief package soon. Here's what we know about the possible size of a future direct payment and how the IRS could send it.(*******), (*****) 8: (******) PM(*)(**)Read More(***)<br/>

(NOT WORKING - notice the … character after PM at the end of the string)

Error is: Operation timed out after 20016 milliseconds with 0 bytes received


I hope this helps solve this issue.


Regards,

Szabi.

supporter elsaeyer
2020-09-30 17:08:37

Hello, are you Spinnerchief API or Spinnerchief web API? And which website did you post to?

user [email protected]
2020-09-30 17:26:28

Thank you for your quick response.


SpinnerChief API.


I tried using this on multiple websites, localhost included. All had the same issue, were timeing out when the … character was sent in the POST request.


Regards.

supporter elsaeyer
2020-09-30 17:37:22

Could you send us your websites and settings? We will pass to the programmer to check.

user [email protected]
2020-09-30 17:40:55

Sure, this is my PHP code (the website is any website, it can be reproduced on any website I try):


function spinnerchief_spin_text($title, $content)

{

    $titleSeparator = '[19459000]';

    $usr = 'USERNAME_SPINNERCHIEF';

    $pss =  'PASSWORD_SPINNERCHIEF';

    $html = stripslashes($title). ' ' . $titleSeparator . ' ' . stripslashes($content);

    if(str_word_count($html) > 5000)

    {

        return FALSE;

    }

$ch = curl_init();

curl_setopt($ch, CURLOPT_HEADER,0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);

curl_setopt($ch, CURLOPT_TIMEOUT, 20);

curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com/');

curl_setopt($ch, CURLOPT_USERAGENT, echo_get_random_user_agent());

curl_setopt($ch, CURLOPT_MAXREDIRS, 5);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

$url = "http://api.spinnerchief.com:443/apikey=api2409357d02fa474d8&username=" . $usr . "&password=" . $pss . "&spinfreq=2&Wordscount=6&wordquality=0&tagprotect=[]&original=0&thesaurus=English&replacetype=0&chartype=1&convertbase=0";

$xlurl="$url";

$curlpost=  ( ( $html ) );

//to fix issue with unicode characters where the API times out

$curlpost = preg_replace('/[\x00-\x1F\x7F-\xFF]/', '', $curlpost);

curl_setopt($ch, CURLOPT_URL, $xlurl);

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, $curlpost); 

  $result = curl_exec($ch);

echo_log_to_file($xlurl . ' - ' . $curlpost);

 

    if ($result === FALSE) {

        $cer = 'Curl error: ' . curl_error($ch);

        echo_log_to_file('"SpinnerChief" failed to exec curl after auth. ' . $cer);

        curl_close ($ch);

        return FALSE;

    }

    curl_close ($ch);

    $result = explode($titleSeparator, $result);

    if (count($result) < 2) {

        return FALSE;

    }

    $spintax = new Echo_Spintax();

    $result[0] = $spintax->process(trim($result[0]));

    $result[1] = $spintax->process(trim($result[1]));

    return $result;

}   


supporter elsaeyer
2020-10-05 09:14:09

Thank you very much, we have informmed the programmer to check it. Once there are news, we will mail you.

supporter elsaeyer
2020-10-10 18:39:08

Hello, the programmer tested with your information on our side and there is no problem.

Attached is the PHP code, maybe you can refer to it.


<?php 

 

//curl ini

$ch = curl_init();

curl_setopt($ch, CURLOPT_HEADER,0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);

curl_setopt($ch, CURLOPT_TIMEOUT,20);

curl_setopt($ch, CURLOPT_REFERER, 'http://www.bing.com/');

curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');

curl_setopt($ch, CURLOPT_MAXREDIRS, 5); // Good leeway for redirections.

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // Many login forms redirect at least once.

curl_setopt($ch, CURLOPT_COOKIEJAR , "cookie.txt");

 

//curl post

 

$wp_auto_spinner_sc_email = "";

$wp_auto_spinner_sc_password = "";

 

$curlurl=$url = "http://api.spinnerchief.com:443/apikey=api0e9db69674144d9c8&querytimes=0&original=0&username=" . urlencode ( $wp_auto_spinner_sc_email ) . "&password=" . urlencode ( $wp_auto_spinner_sc_password ) . "&spinfreq=2&Wordscount=6&wordquality=0&tagprotect=[]&original=0&thesaurus=English&replacetype=0&chartype=1&convertbase=0";

$curlpost="boring coder is poor"; // q=urlencode(data)

curl_setopt($ch, CURLOPT_URL, $curlurl);

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, $curlpost); 

$x='error';

$exec=curl_exec($ch);

$x=curl_error($ch);

 

echo $exec.$x;


?>


System will close this ticket because long time no reply.

change status:Close