summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Burton <philbeansburton@gmail.com>2015-10-19 11:53:38 +0100
committerPhil Burton <philbeansburton@gmail.com>2015-10-19 11:53:38 +0100
commit18bad122b749cfd1135e483a50bc44d20efe3910 (patch)
tree70ef94120b3a736510f7e00bc690aaa41f05a42b
parent8eca1d1fb29f9c5995c9c68b816177190477862e (diff)
stuff
-rwxr-xr-xblapaste.php31
1 files changed, 2 insertions, 29 deletions
diff --git a/blapaste.php b/blapaste.php
index a46a3c1..f400a94 100755
--- a/blapaste.php
+++ b/blapaste.php
@@ -1,29 +1,2 @@
-#!/usr/bin/php
-<?php
-
-$stdin = fopen("php://stdin", "r");
-
-$paste = "";
-while (false !== ($line = fgets($stdin))) {
- $paste .= $line;
-}
-$url = "http://p.of.je/submit.php";
-$myvars = "paste=" . $paste;
-
-$ch = curl_init($url);
-curl_setopt($ch, CURLOPT_POST, 1);
-curl_setopt($ch, CURLOPT_POSTFIELDS, $myvars);
-curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
-curl_setopt($ch, CURLOPT_HEADER, 1);
-curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-
-$response = curl_exec($ch);
-
-$response = explode("\n", $response);
-foreach ($response as $line) {
- if (strpos($line, "Location") !== false) {
- echo $line . "\n";
- exit;
- }
-}
-echo "failed\n";
+blapaste.php
+README.md