Author

Topic: PAYB.TC - The Free Bitcoin Address Shortener (Read 4444 times)

hero member
Activity: 812
Merit: 1000
October 23, 2011, 11:22:54 PM
#35
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/tronlet/rainbow =

http://payb.tc/joelkatz/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 '
';

//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 Cheesy

hero member
Activity: 812
Merit: 1000
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).
hero member
Activity: 812
Merit: 1000
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.
newbie
Activity: 22
Merit: 0
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? Smiley
full member
Activity: 191
Merit: 100
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
hero member
Activity: 812
Merit: 1000
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
hero member
Activity: 812
Merit: 1000
also, i've added links to the various api options on each page.
hero member
Activity: 812
Merit: 1000
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 Smiley

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.
newbie
Activity: 22
Merit: 0
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
newbie
Activity: 22
Merit: 0
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…
hero member
Activity: 812
Merit: 1000
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.
hero member
Activity: 812
Merit: 1000
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.
hero member
Activity: 812
Merit: 1000
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.
newbie
Activity: 22
Merit: 0
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 :-)
sr. member
Activity: 288
Merit: 263
Firstbits.com/1davux
How long is a short name guaranteed to work? Is there an expiration time?
sr. member
Activity: 378
Merit: 255
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
full member
Activity: 191
Merit: 100
It would be nice if there was a link to blockexplorer.com/address/XXX on the site
hero member
Activity: 812
Merit: 1000
thanks! i got the idea when i saw someone else charging money for their shortening service and decided to do a free one.
donator
Activity: 213
Merit: 100
SEIZED by Gunthar
Great idea!
member
Activity: 104
Merit: 100
Very creative domain name, I like it!  Grin
hero member
Activity: 812
Merit: 1000
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?
hero member
Activity: 812
Merit: 1000
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.
full member
Activity: 160
Merit: 100
The /qr works with the Bitpay Android app. It gave the correct address when I used the app's "From Camera" button.

Good job.
full member
Activity: 191
Merit: 100
where do "user" come from?

maybe you can get some ideas here http://blockexplorer.com/q
hero member
Activity: 812
Merit: 1000
what should i include in the json data?

i was thinking:

user -> myusername
address -> 18fjaiofjblahblahblahblah

anything else?
full member
Activity: 191
Merit: 100
suffix? yeah json is next on my to do list Smiley

Yes i meant suffix Tongue
member
Activity: 112
Merit: 10
This is an awesome site. Couldn't have asked for anything more.
hero member
Activity: 812
Merit: 1000
suffix? yeah json is next on my to do list Smiley
full member
Activity: 191
Merit: 100
Idea
Add support for json/jsonp
And the postfix in URL should end /json
full member
Activity: 154
Merit: 100
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.
legendary
Activity: 1078
Merit: 1000
Charlie 'Van Bitcoin' Shrem
This is actually really awesome!

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

/Yankee/
hero member
Activity: 812
Merit: 1000
cool i'm glad this is helpful.

and so i've now also added 'qr' Cheesy Cheesy

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.
newbie
Activity: 24
Merit: 0
+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.
newbie
Activity: 56
Merit: 0
great addition for the community
hero member
Activity: 812
Merit: 1000
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
Jump to: