Created
October 1, 2016 00:13
-
-
Save omarkdev/87da316db687451551cb675762a271c2 to your computer and use it in GitHub Desktop.
curl gugu testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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