Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- _____ _____ _ _____ _____ _____ _____ _____ _____
- ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
- |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
- |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
- |s C R i P T z - T E A M . i N F O|
- [PHP] Bit.ly [APi] Mass Url Generator
- iNFO:
- BiT.LY WONT ALLOW GENERATiON OF SHORT URL OF THE SAME URL, SO WE
- CODED THiS TO BYPASS THEiR CHECK, NOW WHEN YOU ENTER URL VALUE LiKE
- http://scriptz-team.info/ iTS BECOME http://bit.ly/MkxSz9 AND AFTER
- REDiRECT iT LOOKS LiKE
- http://scriptz-team.info/#8149719#5680541#2008972#7901611#4418029#4551391#2056579#3715820#6291809#4418334
- iNTO EVERY NEW GENERATED SHORT URL iS ADDED RANDOM NUMBERS LiKE #8149719 AND ETC...
- Usage:
- DEFiNE "BiTLY_APi_USER" AND "BiTLY_APi_KEY"
- */
- set_time_limit(0);
- define("BiTLY_APi_USER", "");
- define("BiTLY_APi_KEY", "");
- function bit_ly_url($url){
- $format = 'xml';
- $version = '2.0.1';
- $bitly = 'http://api.bit.ly/shorten?version='.$version.'&longUrl='.urlencode($url).'&login='.BiTLY_APi_USER.'&apiKey='.BiTLY_APi_KEY.'&format='.$format;
- $response = file_get_contents($bitly);
- if(strtolower($format) == 'json'){
- $json = @json_decode($response,true);
- return $json['results'][$url]['shortUrl'];
- }else{
- $xml = simplexml_load_string($response);
- return 'http://bit.ly/'.$xml->results->nodeKeyVal->hash;
- }
- }
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Bit.ly [APi] Mass Url Generator</title>
- <style type="text/css">
- html {
- background: #f1f1f1;
- }
- body {
- background: #fff;
- margin: 22px auto;
- width: 764px;
- padding: 22px;
- text-align: center;
- font-family: Georgia, "Times New Roman", Times, serif;
- color: #464646;
- }
- h2 {
- font-size: 3em;
- font-weight: normal;
- }
- </style>
- </head>
- <body>
- <h2>Bit.ly [APi] Mass Url Generator</h2>
- <?php
- if (isset($_POST['doit'])&&($_POST['doit']==1)){
- $tocreate = $_POST['tocreate'];
- $url = $_POST['url'];
- echo "<textarea cols='30' rows='15'>";
- for ($i=0;$i<$tocreate;$i++){
- $url = $url."#".rand(0,9999999);
- $link = bit_ly_url($url);
- echo $link."\r\n";
- }
- echo "</textarea><br /><br />";
- echo "<a href=''>Create More Links</a>";
- exit;
- }
- echo "<form action='' method='post'><input type='hidden' name='doit' value='1' />";
- echo "URL: <input type='text' name='url' size='50' value='' /><br /><br />";
- echo "Create X Bit.ly: <input type='text' size='1' name='tocreate' value='10' /><br /><br />";
- echo "<input type='submit' value='Create Links' />";
- echo "</form><br /><br />";
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment