- file_get_contents: documentation ( source)
- stream_context_create: documentation ( source)
- http_build_query: documentation ( source)
<?php
$postdata = http_build_query(
array(
'author' => 'John Doe',
'email' => 'john@doe.com',
'subject' => 'Get a better Sysadmin',
'message' => '...as i said.',
'action' => 'fastblog_contact_form'
)
);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://alpen-donau.info/wp-admin/admin-ajax.php', false, $context);