i just finished making this code to work, but having a hard time making it look good <?php function curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } function droidwsURL($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://droid.ws/api.php?url=".urlencode($url)); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_HEADER, 0); $shorturl = curl_exec ($ch); curl_close ($ch); return $shorturl; } ?> Code (markup): <?php echo droidwsURL (curPageURL()); ?> Code (markup): working demo: http://stilv.com/test.php im trying to get now the <input feild to work or make it look like http://droid.ws input and have a button in the end says garb it any help will be great
go here: http://droidtweak.com/topic/248166-instamagic-for-instagram-view-your-friends-images-on-your-live-wallpaper/ on the user details left of the post, you see share me with a bit.ly url , i like to replace that with code above
Ok, let's start from the beginning. Are you trying to create a url shortening service? And you want to use the droid.ws API to accomplish it? Ok... so now, why what EricBrugemma was for you absurd? You may need a form! Unless you want to generate automatic URLS, right? Oh I think I got it! You want to automatically generate a short Link and post it in a forum for each new thread! Right?