You are not logged in.

#1 2020-10-22 15:10:42

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 366

[SOLVED] looking for is.gd url shortening script

Hello everybody,

Does anyone have a working 'is.gd' (or its twin 'v.gd') shortening script?

I am looking for a script that works in terminal.

Thank you in advance!

p.s. I am an average Arch user and have no programming skills.

p.p.s. If anyone is interested here is an old 2010 comparison of most popular url shorteners
https://www.pingdom.com/blog/is-goo-gl- … ner-chart/

Performance
http://Goo.gl is fastest
http://Is.gd second

Reliability
http://Bit.ly and http://Goo.gl delivered 100%
http://Is.gd delivered 99.99%

Last edited by amaro (2020-10-23 01:42:14)

Offline

#2 2020-10-22 19:52:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,374
Website

Re: [SOLVED] looking for is.gd url shortening script

If you don't need any of the options, this would do:

#!/bin/sh

curl -s -X POST -F url="$1" https://is.gd/create.php |
        sed -n '/Your shortened URL/{s/.*value="\([^"]*\).*/\1/p;}'

If you want to include some of the options (shorturl, opt, or logstats) you can add those in additional -F flags.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-10-23 01:41:22

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 366

Re: [SOLVED] looking for is.gd url shortening script

@Trilby

Awesome

Thank you, Trilby!

p.s. Works with 'v.gd' too.

Offline

Board footer

Powered by FluxBB