V Posted July 3, 2010 Share Posted July 3, 2010 I'm using CURL to retrieve thumbnails from youtube videos and save into a image folder. I'm trying to replace the url in this code curl_setopt($ch, CURLOPT_URL, 'http://img.youtube.com/vi/QYHzyLrtvBY/0.jpg'); with this http://img.youtube.com/vi/echo $out['v']; echo $out['v] echoes that long youtube code at the end. I tried more variations but I keep getting errors, is it possible to use a variable with CURL? :-\ Quote Link to comment https://forums.phpfreaks.com/topic/206601-adding-variable-to-this/ Share on other sites More sharing options...
trq Posted July 3, 2010 Share Posted July 3, 2010 curl_setopt($ch, CURLOPT_URL, 'http://img.youtube.com/vi/' . $out['v']); Quote Link to comment https://forums.phpfreaks.com/topic/206601-adding-variable-to-this/#findComment-1080581 Share on other sites More sharing options...
V Posted July 3, 2010 Author Share Posted July 3, 2010 Wow thanks! I seem to forgot the basics.. Quote Link to comment https://forums.phpfreaks.com/topic/206601-adding-variable-to-this/#findComment-1080583 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.