Bitcoin Forum

Economy => Marketplace => Topic started by: payb.tc on July 09, 2011, 05:38:03 AM



Title: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 09, 2011, 05:38:03 AM
to help developers use this service, i've now added a plain text version of each page.

for example http://payb.tc/donate gives the full html page and http://payb.tc/donate/text gives just the address in plain text.

simply add /text to your current short link url to have your address returned as plain text.

update: it also now supports qr and json output too. examples:

http://payb.tc/donate (html page)
http://payb.tc/donate/text (plain text)
http://payb.tc/donate/qr (qr encoded image)
http://payb.tc/donate/json (json encoded array with variables 'username' and 'address')

update 2:

each page now has a link to view the address on block explorer, plus links to the api options.

update 3:

added an xml option also:

http://payb.tc/donate/xml


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: done on July 09, 2011, 09:39:10 PM
great addition for the community


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: Skeenz on July 10, 2011, 05:23:58 AM
+1
Awesome change payb.tc
I hope other sites will follow along and make similar changes so that site-scraping does not need to be a dark-art.
At the end of the day, we all need to try and ensure that information is easily accessible - even when retrieved in an automated fashion.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 10, 2011, 06:17:28 AM
cool i'm glad this is helpful.

and so i've now also added 'qr' :D :D

simply add /qr to your short link to get a qr image. example: http://payb.tc/donate/qr

i'm not very familiar with qr or how it looks on phones yet so please let me know if the size and margin is okay.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: Yankee (BitInstant) on July 10, 2011, 06:56:21 AM
This is actually really awesome!

I'm really impressed with this, great job dude!

/Yankee/


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: Alex Beckenham on July 10, 2011, 07:33:20 AM
Good stuff... I was thinking it'd be handy if the various withdrawal forms around the web would also accept a url instead of just accepting a bitcoin address.

Eg. You go to withdraw from Mt Gox and instead of inputting your address you just input your shortener link.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: codler on July 10, 2011, 07:45:02 AM
Idea
Add support for json/jsonp
And the postfix in URL should end /json


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 10, 2011, 10:13:49 AM
suffix? yeah json is next on my to do list :)


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: Stupidpal on July 10, 2011, 10:31:26 AM
This is an awesome site. Couldn't have asked for anything more.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: codler on July 10, 2011, 10:32:54 AM
suffix? yeah json is next on my to do list :)

Yes i meant suffix :P


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 10, 2011, 10:53:39 AM
what should i include in the json data?

i was thinking:

user -> myusername
address -> 18fjaiofjblahblahblahblah

anything else?


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: codler on July 10, 2011, 11:07:18 AM
where do "user" come from?

maybe you can get some ideas here http://blockexplorer.com/q


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: MadSweeney on July 10, 2011, 11:31:43 AM
The /qr works with the Bitpay Android app. It gave the correct address when I used the app's "From Camera" button.

Good job.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 10, 2011, 01:22:31 PM
where do "user" come from?

maybe you can get some ideas here http://blockexplorer.com/q


user would just be the person's short name, eg 'donate'.

sorry i'm not sure how that link you gave me helps.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 11, 2011, 10:18:43 AM
okay now it outputs json

just add /json to the end of your short link and you'll get something like this:

{"username":"donate","address":"13QTW27b3SgqrEjefB9PbiZ6hcrVCJAxfx"}

( that's from http://payb.tc/donate/json )

any comments? is that the sort of output you would expect for a json api?


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: rate5 on July 15, 2011, 10:57:32 AM
Very creative domain name, I like it!  ;D


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: Vasco on July 16, 2011, 04:51:11 AM
Great idea!


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 17, 2011, 03:23:09 AM
thanks! i got the idea when i saw someone else charging money for their shortening service and decided to do a free one.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: codler on July 17, 2011, 07:26:58 AM
It would be nice if there was a link to blockexplorer.com/address/XXX on the site


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: rethaw on July 17, 2011, 07:53:04 AM
Neat!

I would prefer if it defaulted to the text version and you could point to the html version if you chose to.

http://payb.tc/rethaw/text


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: davux on July 17, 2011, 03:52:19 PM
How long is a short name guaranteed to work? Is there an expiration time?


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: ashmoran on July 18, 2011, 07:06:20 PM
Is there any way to make shortened addresses verifiable?

Right now you have to trust the owner of a shortener to not change addresses. Eg the owner of EVILB.TC might shorten http://evilb.tc/yourname honestly for a few weeks (or months, or years) then suddenly change the address (or all of them on the site) to one of his own.

Short, memorable names for Bitcoin addresses are great, but is there any way to achieve them without (or with less) centralised trust?

Note: I'm not saying that PAYB.TC is evil :-)


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 19, 2011, 03:00:54 AM
Neat!

I would prefer if it defaulted to the text version and you could point to the html version if you chose to.

http://payb.tc/rethaw/text

that would make it a lot harder to spread virally via the 'get your own free short link' link on everyone's page. hardly seems fair.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 19, 2011, 03:04:08 AM
How long is a short name guaranteed to work? Is there an expiration time?

there's no expiration time. i'll keep the site up as long as it's still being used. that might be decades.

maybe i should do some kind of internal hit counter though, and if a particular link hasn't been hit in the last 12 months say, then that shortlink can maybe be freed up for someone else to register.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 19, 2011, 03:07:17 AM
Is there any way to make shortened addresses verifiable?

i'm not really sure other than have someone else run a cron to check addresses every x minutes and then alert the owner if it has changed.

payb.tc addresses aren't editible by members so they should never change.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: ashmoran on July 19, 2011, 07:49:51 AM
Yes, I don't expect they will change. Like I say, wasn't suggesting anything would go wrong with payb.tc (I've already got my tip jar name - http://payb.tc/ashmoran - which I've given to friends), just that the principle of address shorteners involves more trust than, say, URL shorteners.

Might put my payb.tc link in my sig, in fact…


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: ashmoran on July 26, 2011, 12:22:17 PM
I had a thought about PAYB.TC - would it be useful to have a link from an address page to the address's blockexplorer.com page? I just went to look up my own address, it'd save a copy and paste if nothing else


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 26, 2011, 01:30:37 PM
I had a thought about PAYB.TC - would it be useful to have a link from an address page to the address's blockexplorer.com page?

done!

also a couple of other things...

firstly, thanks to whoever just sent me 0.1 btc donation, that's great :)

secondly, i noticed in the database the following short links:

http://payb.tc/mtgox edit: confirmed to be unofficial
http://payb.tc/tradehill edit: confirmed to be unofficial

unless the owners of mtgox and tradehill can confirm they are the owners of those addresses, i think we should assume it's just someone trying to be a bit sneaky.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 26, 2011, 01:42:27 PM
also, i've added links to the various api options on each page.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 26, 2011, 02:17:41 PM
one more update... just added xml too (i hope the formatting is acceptable, otherwise please some xml guru tell me if i need to change it):

http://payb.tc/donate/xml

thanks everyone for your interest


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: codler on July 26, 2011, 03:16:38 PM
I had a thought about PAYB.TC - would it be useful to have a link from an address page to the address's blockexplorer.com page?

done!

Thats what I said earlier.. http://forum.bitcoin.org/index.php?topic=27285.msg372019#msg372019


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: ashmoran on July 26, 2011, 03:17:48 PM
Hey, the link is great, thanks for that. QR code works great too, just scanned it off my MBP screen with my iPhone.

About the mtgox/tradehill accounts… maybe it's already time you need "verified" accounts like Twitter? :)


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on July 26, 2011, 03:35:32 PM
I had a thought about PAYB.TC - would it be useful to have a link from an address page to the address's blockexplorer.com page?

done!

Thats what I said earlier.. http://forum.bitcoin.org/index.php?topic=27285.msg372019#msg372019

yes, i see thank you. just hadn't had much time to work on the site until today.


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on August 02, 2011, 07:28:09 AM
I have confirmed with Jered (owner of tradehill) that the short link http://payb.tc/tradehill was not made by them.

probably obvious, but i thought i'd check with them before just deleting it.

anyone using a shortening service (not just mine, but any), should be careful that they are getting the link directly from the person they intend to pay (just like you would with an ordinary bitcoin address).


Title: Re: PAYB.TC - The Free Bitcoin Address Shortener
Post by: payb.tc on October 24, 2011, 04:22:54 AM
today i thought of a new way to visualize bitcoin addresses... using a range of colours which are derived from each address.

check them out:

http://payb.tc/donate/rainbow = http://payb.tc/donate/rainbow

http://payb.tc/tronlet/rainbow = http://payb.tc/tronlet/rainbow

http://payb.tc/joelkatz/rainbow = http://payb.tc/joelkatz/rainbow

http://payb.tc/ashmoran/rainbow = http://payb.tc/ashmoran/rainbow


code here:

Code:
$addr=substr(preg_replace('/[^a-zA-Z0-9]/','',$_GET['addr']),0,34);

$colors=str_split('00'.addressToHash160($addr),2);

//html version:
//for ($i=0; $i<7; $i++) echo '<div style="float:left; width:50px; height:50px; background-color:#'.$colors[$i*3+0].$colors[$i*3+1].$colors[$i*3+2].'"></div>';

//png version:
$img = imagecreatetruecolor(350,50);

for ($i=0; $i<7; $i++) {
$color = imagecolorallocate($img,hexdec($colors[$i*3+0]),hexdec($colors[$i*3+1]),hexdec($colors[$i*3+2]));
imagefilledrectangle ($img,$i*50,0,$i*50+49,49,$color);
}

header('Content-Type: image/png');
header('Content-Disposition: inline; filename='.$addr.'.png');
header('Content-Transfer-Encoding: binary');
header('Pragma: public');
header("Cache-Control: private",false); // required for certain browsers    
ob_clean();
flush();
imagepng($img);
imagedestroy($img);

addressToHash160 function (by theymos, i believe) can be found here: http://pastebin.com/vmRQC7ha


have fun :D