I have to post data by AJAX in wordpress to another Website

This will not work due to the “same-origin policy” unless that server you are trying to reach specifically allows these type of requests with something like Access-Control-Allow-Origin: *. You can read the documentation on MDN in order to get more information about this topic.

From my tests, the server will also need another header configured namely the Access-Control-Allow-Headers so if we combine those two options a valid setup might look like this:

Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type, Accept, Authorization, X-Requested-With