Skip to content

Instantly share code, notes, and snippets.

@omarkdev
Created October 1, 2016 00:13
Show Gist options
  • Save omarkdev/87da316db687451551cb675762a271c2 to your computer and use it in GitHub Desktop.
Save omarkdev/87da316db687451551cb675762a271c2 to your computer and use it in GitHub Desktop.
curl gugu testing
<?php
$words = [
'hue',
'test',
'fuck',
'dilm',
'fora',
'teme',
'pika',
'loko',
'br',
'gugu'
];
$url = 'http://www.gugu.space/post-gugu';
$fields = array(
'date' => date("d/m/Y").' às '.date("H:i"),
'gugu' => $words[array_rand($words,1)]
);
$fields_string = "";
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');
for ($i=0; $i < 100; $i++) {
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
$result = curl_exec($ch);
curl_close($ch);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment