spin script

rayly

Новичок
Регистрация
03.02.2013
Сообщения
8
Благодарностей
0
Баллы
1
Hi, do anyone know how to add a script in projectmaker?
I have a script of spin rewriter and i'm trying to add it to my projet but it only give me error's
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Use POST to their api or you can put up a php page on one of your sites and use that to get your spun text.
 

rayly

Новичок
Регистрация
03.02.2013
Сообщения
8
Благодарностей
0
Баллы
1
I try it but keep receiving error's
do you have any demo or video on how to do it?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
  • Спасибо
Реакции: rayly

rayly

Новичок
Регистрация
03.02.2013
Сообщения
8
Благодарностей
0
Баллы
1
you are a genius! thank you!!
 

rayly

Новичок
Регистрация
03.02.2013
Сообщения
8
Благодарностей
0
Баллы
1
the video was very good and helpfull.
where can I find the text file that he is talking about?

and I am useing an other spin writer and the authentication is not the same I think
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113

rayly

Новичок
Регистрация
03.02.2013
Сообщения
8
Благодарностей
0
Баллы
1
I build the template It work but no result
the reason is it can not read the email adress and the API code, I have try out a few thing's with out result

this is the API php :

<?php

// Spin Rewriter API settings - authentication:
$email_address = "[email protected]"; // your Spin Rewriter email address goes here
$api_key = "1ab234c#d5e67fg_h8ijklm?901n234"; // your unique Spin Rewriter API key goes here

// Include the Spin Rewriter API SDK.
require_once("SpinRewriterAPI.php");

// Authenticate yourself.
$spinrewriter_api = new SpinRewriterAPI($email_address, $api_key);

// (optional) Set whether Spin Rewriter should only use synonyms (where available) when generating spun text.
$spinrewriter_api->setUseOnlySynonyms(false);

/*
* IMPORTANT:
*
* When using the action 'unique_variation_from_spintax', your text
* should already contain valid {first option|second option} spinning syntax.
*
* No additional processing is done on your text, Spin Rewriter simply
* provides one of the unique variations of the given (already spun) text.
*/
$text = "John {will|will certainly} {book|make a reservation for} a {room|hotel suite}.";

// Make the actual API request and save response as a native PHP array.
$api_response = $spinrewriter_api->getUniqueVariationFromSpintax($text);

// Output the API response.
echo "<b>API response:</b> <br /><br /> \n\n<pre>";
print_r($api_response);
echo "</pre>";

?>
 

rayly

Новичок
Регистрация
03.02.2013
Сообщения
8
Благодарностей
0
Баллы
1
I build the template It work but no result
the reason is it can not read the email adress and the API code, I have try out a few thing's with out result

this is the API php :

<?php

// Spin Rewriter API settings - authentication:
$email_address = "[email protected]"; // your Spin Rewriter email address goes here
$api_key = "1ab234c#d5e67fg_h8ijklm?901n234"; // your unique Spin Rewriter API key goes here

// Include the Spin Rewriter API SDK.
require_once("SpinRewriterAPI.php");

// Authenticate yourself.
$spinrewriter_api = new SpinRewriterAPI($email_address, $api_key);

// (optional) Set whether Spin Rewriter should only use synonyms (where available) when generating spun text.
$spinrewriter_api->setUseOnlySynonyms(false);

/*
* IMPORTANT:
*
* When using the action 'unique_variation_from_spintax', your text
* should already contain valid {first option|second option} spinning syntax.
*
* No additional processing is done on your text, Spin Rewriter simply
* provides one of the unique variations of the given (already spun) text.
*/
$text = "John {will|will certainly} {book|make a reservation for} a {room|hotel suite}.";

// Make the actual API request and save response as a native PHP array.
$api_response = $spinrewriter_api->getUniqueVariationFromSpintax($text);

// Output the API response.
echo "<b>API response:</b> <br /><br /> \n\n<pre>";
print_r($api_response);
echo "</pre>";

?>
{"status":"ERROR","response":"Email address and unique API key are both required. At least one is missing."}
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
There is bug in POST request.
Use Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 as useragent.
 

rayly

Новичок
Регистрация
03.02.2013
Сообщения
8
Благодарностей
0
Баллы
1
can you give me an example?
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)