Pastoid

function pastoid($pa

The page you are looking at now is at this URL: http://pastoid.com/bov

This paste was last updated on February 3, 2009 at 11:09 pm.

php coderaw

function pastoid($paste)
{
	$url = null;
	$post = http_build_query(array(
		'paste[1][content]' => $paste,
		'paste[1][type]' => 'code',
		'paste[1][language]' => 'php',
		'pastetitle' => substr($paste, 0, 20),
		));
	$context = stream_context_create(array(
	'http' => array (
		'method' => 'POST',
		'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
			. "Content-Length: " . strlen($post) . "\r\n",
		'content' => $post
		)
	));
 
	if ($page = fopen('http://pastoid.com/', 'r', false, $context)) {
		stream_set_timeout($page, 3.5);
		$data = stream_get_meta_data($page);
		foreach ($data['wrapper_data'] as $header) {
			echo $header."\n";
			if (preg_match('#^Location:\s*(.*)$#i', $header, $match)) {
				$url = $match[1];
				break;
			}
		}
	}
	return $url;
}

Toggle wordwrap

Referring DomainHits
Unknown Referer 127
pastoid.com 10
search.live.com 3
drunkenmonkey.org 1
Is this paste spam?
<Hide