picasa link to usable cooliris link

281 views Asked by At

Ok, I've got this link:

https://picasaweb.google.com/110727246651632161982/2042011#

and I want to use it for cooliris, on their website they make it like this:

picasaweb.google.com%2F%3Fuser%3D110727246651632161982%26album%3D2042011

I want users to post the normal picasa link into my website, then the link has to be replaced and pasted into my database. I know how to do that, but how to get from the picasa link to the usable cooliris link?

1

There are 1 answers

1
Wh1T3h4Ck5 On

Example: DECODE

$url = 'picasaweb.google.com%2F%3Fuser%3D110727246651632161982%26album%3D2042011';
echo urldecode($url);

Output

picasaweb.google.com/?user=110727246651632161982&album=2042011

Example: ENCODE

$url = 'picasaweb.google.com/110727246651632161982/2042011#';
echo urlencode($url);

Output

picasaweb.google.com%2F110727246651632161982%2F2042011%23

References: