Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6057479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:29:36+00:00 2026-05-23T08:29:36+00:00

$thumbnail_url = ‘http://img.youtube.com/vi/JaFfJN_iKdA/default.jpg’; function save_image_local($thumbnail_url) { //for save image at local server $filename =

  • 0
$thumbnail_url = 'http://img.youtube.com/vi/JaFfJN_iKdA/default.jpg';


function save_image_local($thumbnail_url)
    {
         //for save image at local server
         $filename = time().'_hk.jpg';
         $fullpath = '../../app/webroot/img/daily_videos/image/'.$filename;
        $fp = fopen($fullpath,'x');
        fwrite($fp, $thumbnail_url);
        fclose($fp);

    }

in this code, Blank image store.not original image store.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:29:36+00:00Added an answer on May 23, 2026 at 8:29 am

    You are just writing the thumbnail url not the content of image. You have to get the content of image from the url and write it to image file.

    Below is short cut of fopen, fwrite.

    $img_content=file_get_contents($thumbnail_url);
    file_put_contents($fullpath,$img_content );
    

    OR

    $img_content=file_get_contents($thumbnail_url);
    $fp = fopen($fullpath,'x');
    fwrite($fp, $img_content);
    fclose($fp);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My WS returns simple json like this: { thumbnail_url: http://something.com/photos/003/582/test-tiny.jpg?1321956139, success: true, photo_url: http://something.com/photos/003/582/test-medium.jpg?1321956139,
Scribd's API returns XML, for example: <?xml version=1.0 encoding=UTF-8?><rsp stat=ok><thumbnail_url>http://imgv2-4.scribdassets.com/img/word_document/60906103/111x142/79c5e6bab7/1327030759</thumbnail_url></rsp> is there a way
For example: http://soundcloud.com/mhiqu3/sets/heretik/ How to get the thumbnail url: http://i1.sndcdn.com/artworks-000004897289-5r6ws9-large.jpg?1767646 with the api (or
For the last few hours I've been trying to set up this http://code.google.com/apis/books/docs/dynamic-links.html on
function new_photo() { if( !empty($this->data)) { $this->data['Photo']['showcase_id'] = $this->Session->read('CurrShowcase.id'); $this->data['Photo']['added'] = date(Y-m-d H:i:s); $this->Showcase->Photo->save($this->data);
I am testing a thumbnail image creator script which creates a thumbnail that can
I have a thumbnail image inside a div. I use another image as the
I have a thumbnail image list, all of them have an attribute of 'rel'
I'm trying to return a thumbnail from a blobstore. For the full image, I
I want to get a thumbnail image for videos from Vimeo. When getting images

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.