3
wp_remote_post를 사용하여 한 서버에서 다른 웹 사이트로 정보를 보내고 싶습니다.Wordpress wp_remote_post
그래서 기본적으로, 나는 내 코드에이 줄을 추가 한 -
$sidebarHTTP = site_url(); // Retrieves HTTP Url of sidebar
$sidebarActivation = $sidebar.' , '.$sidebarHTTP; // Activate Sidebar
$args = array(
'method' => 'post',
'body' => array('sidebar' => $sidebar, 'sidebarHTTP' => $sidebarHTTP),
'user-agent' => 'My site'
);
wp_remote_post('http://mysite.com', $args); // Loads all default data
그래서 기본적으로, 그것은 아무것도 보내지 않습니다. 예, 올바른 도메인을 입력했습니다. 아마 뭔가를 보내지 만 어떻게 그 사이트에서 $ args [ 'body']를 검색 할 수 있을지 모르겠다. 또한 $ response = wp_remote_post ....를 추가하고 메일 $ response [ 'body']를 보냈지 만 홈 페이지의 소스 코드를 전자 메일로 보냅니다.
도움을 주셔서 감사합니다.
제 1 회 사용하는 것입니다 http://codex.wordpress.org/Function_API/wp_remote_post을; 둘째, 컬이 켜져 있는지 확인합니까? – Sergey