andre1990 — 2011-10-08T18:33:16-04:00 — #1
Hi, so as some of you will know i have a file upload site that outputs bit.ly links.
$contents = file_get_contents("http://api.bit.ly/v3/shorten?login=andre1990&apiKey=R_56a95c84d089129012516e24806c3649&longUrl=".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 goo.gl instead now, any help? Ive got an api key.
andre1990 — 2011-10-09T08:09:22-04:00 — #2
Any help at all?
I think goo.gl uses curl command, but i wanted to just adapt my current code rather than start again.
salathe — 2011-10-09T15:23:37-04:00 — #3
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).
andre1990 — 2011-10-09T17:16:02-04:00 — #4
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.