Is it possible, to fetch the whole URL?
For example, I have a variable $thumbnail =
The link:
cdn1.image.website.webcdn.com/115600/20/4851311/original/8.jpg
Is there a way to fetch this so I can assign it to $thumbnail =
THANKS!
Is it possible, to fetch the whole URL?
For example, I have a variable $thumbnail =
The link:
cdn1.image.website.webcdn.com/115600/20/4851311/original/8.jpg
Is there a way to fetch this so I can assign it to $thumbnail =
THANKS!
depends on how youâre retrieving the image.
These 3 parts of the url is dynamic⌠they change depending on the image: 115600/20/4851311
So, ideally, I would like to do some kind of variable that changes when these change.
Then just take those variables and put them on $thumbnail, something like whatâs below.
$thumbnail = âcdn1.image.website.webcdn.com/".$user."/â.$image;
Oh, I tried and I tried :o I can add one variable, but if I add two or three, it doesnât fetch image For the life of me I canât figure out why.
This works:
[php]$thumbnail = âcdn1.image.website.webcdn.com/201305/25/â.$url_id.â/original/8.jpgâ; [/php]
BUT if I try to add one or two of these variables to the path /20305/25/ it absolutely fails.
Here is what I am using⌠any suggestions?? Please.
[php]
<?php function _video_embed_website_split($s, $str) { $ret = array(); $tmp = ''; $size = strlen($str); for ($i = 0; $i < $size; $i++) { $char = d_substr($str, $i, 1); if ($char == $s) { $ret[] = $tmp; $tmp = ''; } else { $tmp .= $char; } } if ($tmp) { $ret[] = $tmp; } return $ret; } function _video_embed_website_get_video_id_url($url) { $matches = array(); $matches = _video_embed_website_split("/", $url); $index = count($matches) - 5; if ($matches[$index]) { return $matches[$index]; } return FALSE; } function _video_embed_website_get_video_url_name($url) { $matches = array(); $matches = _video_embed_website_split("/", $url); $index = count($matches) - 4; if ($matches[$index]) { return $matches[$index]; } return FALSE; } function _video_embed_website_get_video_url_id($url) { $matches = array(); $matches = _video_embed_website_split("/", $url); $index = count($matches) - 3; if ($matches[$index]) { return $matches[$index]; } return FALSE; } [/php]