WhiteHatBox
Share Page
Following(1)
Partner(s)
WhiteHatBox

How to set hosts file ?

ReplyThanks 2014/07/25 03:17:38 0 1

Why do I need modify hosts file?

For using the WordAi/Spinrewriter/TBS interface in the third-party software with X-Spinner, X-Spinner need modify the hosts file in your system, so that when the third-party software visits tbs, wordai or spinrewriter server, x-spinner can intercept the visit and deal with the spin directly. Usually X-Spinner will set everything automatically, but sometimes, there maybe a problem in some special system environment, then you have to set it manually.


Modify hosts file

Usually the hosts file is at C:\Windows\System32\drivers\etc\hosts, you just need go there and open the file, add following content into the file, then save it.


127.0.0.1 wordai.com
127.0.0.1 www.wordai.com
127.0.0.1 thebestspinner.com
127.0.0.1 www.thebestspinner.com
127.0.0.1 spinrewriter.com

127.0.0.1 www.spinrewriter.com


like following picture>>

If you set x-spinner to listen at other ip like 192.168.1.100, you should change 127.0.0.1 to other ip(192.168.1.100).

After change and save the hosts file, you can open your browser and visit http://wordai.com, if the browser return "X-Spinner Message: Please use 'Post' way to send command.“, it means the set is successful. like following picture >>

If it still can't work after these settings, maybe you didn't modify the right hosts file. Somtimes there are multi-hosts files in your system, you can search "hosts" in your drive C and find all hosts files, and change all of them like above. >>

See? There are 2 hosts files, we modified the first one, but the second one is not modified, so it maybe still can't work. Now we need open the second hosts file and modify it as before. After we modify all hosts files, it should work without any problem.


Permission problem when modify hosts file

Sometimes, when you modify the hosts file, system will tell you that you don't have enough permission to modify this file even you are using administrator account >>

When this happen, we need a tool to help us to take ownership of the system files or folders, then we can edit the file. If you can't edit the hosts file with your administrator account, please get the tool at

http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/ , and follow the introduction on the page to take the ownership of hosts files and folders, then you should be able to edit hosts files.


Sometimes, whatever we do, we can't edit the hosts file in the original folder, we can just copy the hosts file out of the original folder, then edit and save it. After edit, delete the original file and copy the edited file into the original folder.


Another tip is that sometimes we can't edit the hosts file in the folder similar to "C:\Windows\WinSxS\amd64_microsoft-windows-w..ucture-other-minwin_31bf3856ad364e35_6.3.9600.16384_none_25fdfd813908f8a6", we can take the ownership of this hosts file first, then delete it directly. Only edit and save the hosts file in "C:\Windows\System32\drivers\etc\” folder.


Let's ROCK!
Kdantzler
2015/09/12 23:10:27

X-Spinner API

The X-Spinner API is designed to be extremely simple and easy to understand. All you have to do is make an HTTP request with POST variables. If the spinning is successful, the HTTP request will return the spun text directly. If the spinning is failed, the HTTP request will return empty string. Our example below is a C# example, but you can use whatever programming language you want.

HTTP POST URL

The HTTP POST URL is up to which IP and Port does X-Spinner listen at. The default listen ip and port of X-Spinner is 127.0.0.1 and 80 port, so the default post url is http://127.0.0.1:80/ . But X-Spinner user may change the listen ip and port, so you'd better let your users input the X-Spinner listen ip and port in your software and get the right post url.

HTTP POST Parameters

xstext (Required) - The text that you would like X-Spinner to spin.

spintype (Optional) - 0 means spin to new article, 1 means spin to {|} format.

removeold (Optional) - 0 means don't remove original word in spin result, 1 means remove original word in spin result.

protectw (Optional) - If you don't want to protect any word, set it to protectw=null. If you want to protect some words, set it like protectw=word1,word2,word3, then X-Spinner will not spin these words.

spinway (Optional) - 0 uses free spin, 1 users normal spin, 2 users super spin.

thesaurus (Optional) - Default will use the default thesaurus in X-Spinner, the values of this parameter can be Arabic, Belarusian, Bulgarian, Croatian, Danish, Dutch, English, Filipino, Finnish, French, German,
Greek, Hebrew, Indonesian, Italian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Slovak,
Slovenian, Spanish, Swedish, Turkish, Vietnamese and yourself thesaurus name in X-Spinner.
(This parameter only be valid in X-Spinner Developer Version)

Notice:

1. All parameters name need be lowercase.

2. X-Spinner will use the settings in X-Spinner software if you don’t send the parameter in your post.

HTTP POST Encode

Because X-Spinner supports many language including Spanish, French and Dutch etc. Some language need use UTF8 encode in the POST Request and Response for getting right text, so X-Spinner API only use UTF8 to accept your request data and response using UTF8 encode. This is very important, if you don't use UTF8, will get error text.

Example Code

public string xspinner(string ip, string port, string txt)
{
System.Net.WebClient wb = new System.Net.WebClient();
string postdata = "xstext=" + txt;
byte[] postdata1 = Encoding.UTF8.GetBytes(postdata);
byte[] ret = wb.UploadData("http://" + ip + ":" + port, "POST", postdata1);
return Encoding.UTF8.GetString(ret);
}
//Load the function to use x-spinner api
xspinner("127.0.0.1","80","The X-Spinner API is designed to be extremely simple and easy to understand.");

Example Output:

The X-Spinner API {is designed to|was created to} be extremely {simple and easy|easy and simple} to {understand|use}.

Example Failure Output:

If the spin is failed, X-Spinner will just return empty string.

Kdantzler
2015/09/12 23:11:09

X-Spinner API

The X-Spinner API is designed to be extremely simple and easy to understand. All you have to do is make an HTTP request with POST variables. If the spinning is successful, the HTTP request will return the spun text directly. If the spinning is failed, the HTTP request will return empty string. Our example below is a C# example, but you can use whatever programming language you want.

HTTP POST URL

The HTTP POST URL is up to which IP and Port does X-Spinner listen at. The default listen ip and port of X-Spinner is 127.0.0.1 and 80 port, so the default post url is http://127.0.0.1:80/ . But X-Spinner user may change the listen ip and port, so you'd better let your users input the X-Spinner listen ip and port in your software and get the right post url.

HTTP POST Parameters

xstext (Required) - The text that you would like X-Spinner to spin.

spintype (Optional) - 0 means spin to new article, 1 means spin to {|} format.

removeold (Optional) - 0 means don't remove original word in spin result, 1 means remove original word in spin result.

protectw (Optional) - If you don't want to protect any word, set it to protectw=null. If you want to protect some words, set it like protectw=word1,word2,word3, then X-Spinner will not spin these words.

spinway (Optional) - 0 uses free spin, 1 users normal spin, 2 users super spin.

thesaurus (Optional) - Default will use the default thesaurus in X-Spinner, the values of this parameter can be Arabic, Belarusian, Bulgarian, Croatian, Danish, Dutch, English, Filipino, Finnish, French, German,
Greek, Hebrew, Indonesian, Italian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Slovak,
Slovenian, Spanish, Swedish, Turkish, Vietnamese and yourself thesaurus name in X-Spinner.
(This parameter only be valid in X-Spinner Developer Version)

Notice:

1. All parameters name need be lowercase.

2. X-Spinner will use the settings in X-Spinner software if you don’t send the parameter in your post.

HTTP POST Encode

Because X-Spinner supports many language including Spanish, French and Dutch etc. Some language need use UTF8 encode in the POST Request and Response for getting right text, so X-Spinner API only use UTF8 to accept your request data and response using UTF8 encode. This is very important, if you don't use UTF8, will get error text.

Example Code

public string xspinner(string ip, string port, string txt)
{
System.Net.WebClient wb = new System.Net.WebClient();
string postdata = "xstext=" + txt;
byte[] postdata1 = Encoding.UTF8.GetBytes(postdata);
byte[] ret = wb.UploadData("http://" + ip + ":" + port, "POST", postdata1);
return Encoding.UTF8.GetString(ret);
}
//Load the function to use x-spinner api
xspinner("127.0.0.1","80","The X-Spinner API is designed to be extremely simple and easy to understand.");

Example Output:

The X-Spinner API {is designed to|was created to} be extremely {simple and easy|easy and simple} to {understand|use}.

Example Failure Output:

If the spin is failed, X-Spinner will just return empty string.

vceexamdumps1
2016/04/26 05:44:02
thanks for nice post please keep it up nice work because your post is very helpful for others...


https://www.vceexamdumps.com/
Aprilcaicai
2016/04/27 02:40:22

Thanks for your support, we will make it be more better.

Wish you have a nice day!!

<< < 1> >>
VerifyCode
Advanced Option