Using url shortener [Help modifying shortener for]

Hi, so as some of you will know i have a file upload site that outputs links.

$contents = file_get_contents("".urlencode($final)."&format=txt");

echoing it out as:

<input type=“text” size=“10” onClick=select() value=“<?php echo $contents;?>” READONLY><p />

Now i want to use instead now, any help? Ive got an api key.

Any help at all?

I think uses curl command, but i wanted to just adapt my current code rather than start again.

This may be a silly question, but have you read through the documentation about the url shortener? It details everything that you will have to do (and how to do it) and provides code samples for using with PHP (and lots of other languages).

Not a silly question…i have had a look through and wasn’t able to decipher what a single piece of code would look like that would get the job done.