1- Just use jquery on form submit.
jQuery(document).ready(function ($) {
//default wordpress new post form id = #post
$("#post").submit(function () {
$.ajax({
url: "http://YOUR URL",
success: function (response) {
console.log("CALL OK!");
},
error: function () {
console.log("CALL FAILED!");
}
});
});
});
2- Put this code inside your theme: make new file, put the code above inside and save it in your theme dir. for example “this_is_my_scripts.js”
3- load your script file into admin. Put this code inside functions.php of your theme:
function custom_js_enqueue() {
wp_enqueue_script( 'my_custom_script', get_template_directory_uri() . '/this_is_my_script.js' );
}
add_action( 'admin_enqueue_scripts', 'custom_js_enqueue' );