Support

Account

Home Forums ACF PRO ACF Pro Cannot Connect to Update Server Reply To: ACF Pro Cannot Connect to Update Server

  • The address:

    http://connect.advancedcustomfields.com/index.php

    After the index.php are usually arguments for what info is to be grabbed. For example, the get-info call (for checking the version):

    http://connect.advancedcustomfields.com/index.php?a=get-info&p=pro

    The function used to grab this data from a remote server is:

    wp_remote_post()

    (this function is called in ‘advanced-custom-fields-pro/pro/api/api-pro.php’, and is located in ‘wp-includes/http.php’)

    wp_remote_post() is a WordPress function. As Hube2 said, it creates a WP_Http object, going through a chain of functions, eventually resulting in either cURL or streams being used.

    The Wp_Http class is available to browse here:
    https://github.com/WordPress/WordPress/blob/master/wp-includes/class-http.php

    This file contains all the actual functions for handling any sort of remote connection.

    Inside the file, the 2 possible options (curl or streams) have classes associated with them.

    The class WP_Http_Curl handles the cURL session, setting up options and handling errors. This class contains all of the functions ran (stuff like curl_init, curl_setopt, curl_exec).

    If cURL isn’t used, then the class WP_Http_Streams handles the connection. This class contains all of the functions ran for the connection (stuff like stream_context_create, stream_socket_client ).