diff --git a/_function.php b/_function.php new file mode 100644 index 0000000..fedbdba --- /dev/null +++ b/_function.php @@ -0,0 +1,67 @@ + true, + CURLOPT_URL => $url, + CURLOPT_TIMEOUT => 10, + CURLOPT_CONNECTTIMEOUT => 5, + CURLOPT_SSL_VERIFYPEER => FALSE, + CURLOPT_HEADER => 1, + ); + curl_setopt_array($ch, $opts); + if ($uri['host'] != 'sh.st') curl_setopt($ch, CURLOPT_USERAGENT, $this->httph); + if ($otherheader) curl_setopt($ch, CURLOPT_HTTPHEADER, $otherheader); + if ($cookie) curl_setopt($ch, CURLOPT_COOKIE, $cookie); + if ($postparam) + { + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $postparam); + } + + $data = curl_exec($ch); + curl_close($ch); + return ($data) ? $data : false; + } + /** + * [decode_adfly adf.ly decode URL] + * @param [string] $ysmm [adf.ly ysmm data] + * @return [string] [Original URL] + * Source by http://skizzerz.net/scripts/adfly.php + */ + public function decode_adfly( $ysmm ) { + $left = ''; + $right = ''; + for ( $i = 0; $i < strlen( $ysmm ); $i++ ) { + if ( $i % 2 == 0 ) { + $left .= $ysmm[$i]; + } else { + $right = $ysmm[$i] . $right; + } + } + return substr( base64_decode( $left . $right ), 2 ); + } + } \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..32f5b5f --- /dev/null +++ b/index.php @@ -0,0 +1,81 @@ +splits($aa->WEBParsing($url), 'Location: ', PHP_EOL); + break; + case 'durl.kr': + $data = $aa->splits($aa->WEBParsing($url), '
For example:
+'>http://me2.do/G4AB9cJL
+'>https://goo.gl/AIScrC
+'>http://bit.ly/29O1WJt
+'>http://durl.kr/cpubjn
How to use? : ?url=URL
+Supported URL : me2.do / goo.gl / tinyurl.com / me2.do / durl.kr / adf.ly / sh.st / adfoc.us / bc.vc (wait for 5 seconds)