Example #1
0
<?php

if (!isset($_SESSION)) {
    session_start();
}
include_once '../lib/twitese.php';
$long_urls = array();
$long_urls = explode("|", substr($_POST['long_urls'], 0, -1));
$short_urls = '';
foreach ($long_urls as $url) {
    $short_urls .= urlshorten($url) . '|' . $url . '^';
}
echo substr($short_urls, 0, -1);
Example #2
0
			<tr>
				<td colspan="2"><h2>Share to Embr</h2><span id="tip"><b>140</b></span></td>
			</tr>
			<tr>
				<td><input type="text" name="url" id="url" disabled="ture" value="<?php 
        echo $url;
        ?>
"/></td>
			</tr>
			<tr>
			<td><textarea name="status" id="textbox"><?php 
        echo $text;
        ?>
 <?php 
        if (strlen($url) > 30) {
            echo urlshorten($url);
        } else {
            echo $url;
        }
        ?>
</textarea></td>
			</tr>
			<tr>
			<td>
				<input class="more round" id="shareBtn" type="submit" value="Share" />
				</td>
			</tr>
		</table>
		</form>
	<?php 
    }