Performs an HTTP request using the POST method and returns its response. Important: If the URL is user-controlled, use `wp_safe_remote_post()` instead.
$url, $args = array(
Sortie :
@param string $url URL to retrieve. @param array $args Optional. Request arguments. Default empty array. @return array|WP_Error The response or WP_Error on failure.
// Utilisation de la fonction wp_remote_post
$result = wp_remote_post($url, $args = array();
if ($result) {
// Votre logique ici
}
Chargement des actualités...