开发者

picasa link to usable cooliris link

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 pos开发者_如何学编程t 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?


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:

  • urldecode()
  • urlencode()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜