Expand tiny URLs / DOIs Expand tiny URLs, DOIs, QRcodes 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:

There are two main types here. First / main sort is ones like 10.1119/1.1845987;   second sort are the square barcode/optical ones Passport photo (jump to example below).

Tiny URL tail / DOI input 1. Java, redirect 2. PHP, redirect 3. Java, browser POST 4. PHP, PHP POST Example
(click to load)
Home Country POST as well as GET? Comments
1 https://doi.org/ US POST DOIs: digital object identifier service
2 - - http://tinyurl.com/ US
22 - - http://preview.tinyurl.com/ US Shows URL it expands to, before going
3 - - http://bit.ly/ Libya Used by NewSci
4 - - http://goo.gl/ Greenland Google's shortener service
5 - - http://hdl.handle.net/ US Uses handles for persistent IDs, and offers analysis
6 - - http://ind.pn/ Pitcairn islands The Independent newspaper

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:

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.

  1. 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} )
  2. 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.
  3. 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?

    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

    Passport photo [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:
    Passport photo
    Choose a QRcode image file from desktop:

    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
    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]