Last changed
15 April 2012 ............... Length about 1,300 words (15,000 bytes).
(Document started on 9 Mar 2010.)
This is a WWW document maintained by
Steve Draper, installed at http://www.psy.gla.ac.uk/~steve/dotiny.php.
You may copy it.
How to refer to it.
Web site logical path:
[www.psy.gla.ac.uk]
[~steve]
[this page]
Expand tiny URLs, DOIs, QRcodes
By
Steve Draper,
Department of Psychology,
University of Glasgow.
The purposes of this page are:
- Handy tool box (launchpad) for expanding short-form URLs I want to follow
up.
- Collect basic information on the ones I've seen.
- Links to creating and customising short URLs.
- A demo collection of methods for doing POST.
There are two main types here.
First / main sort is ones like 10.1119/1.1845987;
second sort are the square barcode/optical ones
(jump to example below).
Old form: http://dx.doi.org/ New form: https://doi.org/"
Creating custom (tiny?) URLs:
http://tiny.cc/
http://bit.do/
http://tinyurl.com/create.php
https://bitly.com/a/ advanced
Also, doi.org seems to do them now as well.
Sequence of URLs from a New Scientist short url:
- cdw7 [pasted into this page]
- https://doi.org/cdw7
- https://10.1126/sciadv.1700489
- http://advances.sciencemag.org/content/3/10/e1700489/tab-pdf
- http://advances.sciencemag.org/content/advances/3/10/e1700489.full.pdf
To look up what country goes with a domain name, type e.g. '.ly' in wikiP
here; or look it
up (Find command) on
this page.
POST / redirect methods
All these particular services accept URLs i.e. < A links>, which are GET.
Only DOI supports POST.
Only DOI supports any GET/POST/request string.
- Fastest is java: browser-java assembles URL, then follows link.
I.e. It's a link, whose href execs java, which does a redirect to a
URL(server + / + {IDstring treated as filename} )
- PHP-redirect:
Uses single big FORM-GET, which calls this script again, PHP calcs
vars, then sends the browser a redirect in HEAD, which goes there.
No reliance on java at all.
- Direct browser POST as good, though more java exec?
Uses java to insert FORM values, then single big FORM-POST.
But only DOI supports any GET/POST/request string.
method: |
1. Java, redirect |
2. PHP, redirect |
3. Java, browser POST |
4. PHP, PHP POST |
Uses Java on this page? (may not work cross-browser) |
Yes | No | Yes |
No |
Uses FORM on this page to compose args |
Yes |
Yes |
Yes |
Yes |
Number of different servers called? |
1 | 2 | 1 | 2 |
Number of HTTP calls by this browser (to servers) |
1 | 2 | 1 | 1 |
My code |
java |
PHP, FORMhtml |
java, FORMhtml |
PHP, FORMhtml |
Work by this browser |
All use pageRender on result;
All compose FORM to gather args from user;
1,3? compose a 2nd FORM's args.
1,3 exec Java
|
Need to see these servers take GET args, POST args, or only GET but no args
Check above form.
Insert in top table POST cases: will those servers take them?
Does this use myPHP doing POST-mygetfile ?? Or an auto-exec FORM on a
page? or both?
Can I get a Preview i.e. URL expansion but not exec from all providers?
base36 encoding?
WHAT'S WRONG? STILL TO DO?
After page-back in browser after a direct-POST, need to reload page
location.reload(true); // forces a reload from the server
OR: location.href = location.href;
What about < CR> in input box?
QR codes
[Keyword: "Google goggles"]
QR codes are the square black&white patterns that are a new form of
barcode; which a (mobile phone) camera can pick up, recog, turn into a URL.
See wikiP.
|
How to deal with this on my desktop computer?
Generate (from text to QRcode)
Can use a web service to generate one from text (often but not always of a URL)
e.g.
http://createqrcode.appspot.com/
This returns a web page;
and dragging from the webpage to desktop gives a .png file;
and Preview will convert that to JPEG, etc.
Or could download free software to do it.
Read image file
So I need, really, a service or app that would take an image file (PDF, png,
jpeg, ...) and return the string.
And this one doesn't need it to begin 'http://':
http://zxing.org/w/decode.jspx
Direct input form:
May click on box, if visible, to browse. Would like to be able to paste in URL.
|
Read printed image from paper
I have the free
QReader
app installed that will photograph a printout I hold
up to my Mac camera; and give the translation; which can then be copy/pasted
into my browser.
And this is clumsy having to print out a file/web page image then hold up
paper to camera.
To run it:
Click on link above
Go to my downloads folder
Dclick on it
Say Yes to opening it, despite warning.
BUT it only decodes URLs, not plain text.
HOWEVER if the message begins with 'http:// ', then it does report the rest
of the message even though not a viable URL.
TO DO
Need to u. button "enctype" better.
Would like to reword the button for browse.
Work with java could reveal the object; and then exec java to rename.
First button in that form, .name = myname.
Want to paste in desktop url.
Could probably have a text input extra element; and use java to copy it to
file element? but that wouldn't get it to read the dir and get the real file
name/handle.
Unless there's a way to open file dlog, but pre-scrolled to file.
Web site logical path:
[www.psy.gla.ac.uk]
[~steve]
[this page]
[Top of this page]