dexter
dexter

Reputation: 133

how to change link from image url using php

i want to get image from google plus, url image like here

https://lh3.googleusercontent.com/-Sjhjjjjjj/........./s200-c/201gjghjphotoo1.jpg

how to can replace s200-c to s0 for full size

my code but not work

$file = preg_replace("/.+\\/\\/(\\d+).+/", "s0", $file);

Upvotes: 0

Views: 44

Answers (1)

Amol Wankhede
Amol Wankhede

Reputation: 81

The PHP str_replace function can do the trick.

$file = str_replace("s200-c", "s0", $file);

Upvotes: 1

Related Questions