- file_get_contents: documentation ( source)
- var_dump: documentation ( source)
- stream_context_create: documentation ( source)
- http_build_query: documentation ( source)
<?php
$url = 'http://younginnovator.eu/wp-admin/admin-ajax.php?action=galleryvotingvote';
$data = array('attachment_id' => '7033');
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
),
);
for ($i =1; $i<100; $i++){
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
var_dump($result);
}
?>