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

  • Home
  • SEARCH
  • 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 8000817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:55:01+00:00 2026-06-04T15:55:01+00:00

CodeIgniter upload library only supports uploading image file from PC. I am trying to

  • 0

CodeIgniter upload library only supports uploading image file from PC.

I am trying to make a code that a user can upload image with image url address.

http://example.com/photo/jake2910.jpg

I simply send this image address to server and upload the photo.

Is there a way to do that? (trust me I tried different codes already for few days.)

  • 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-06-04T15:55:02+00:00Added an answer on June 4, 2026 at 3:55 pm

    There is no need in CI’s upload library at all. You can simply download the file with this code:

    $url = 'http://example.com/photo/jake2910.jpg';
    /* Extract the filename */
    $filename = substr($url, strrpos($url, '/') + 1);
    /* Save file wherever you want */
    file_put_contents('upload/'.$filename, file_get_contents($url));
    

    But be very cautious about what files you are trying to save. Remember that even images can be stuffed with vulnerable code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's ok to upload image in file using codeigniter upload library with this example.
I am trying to extend the Upload library in CodeIgniter. I have been trying
I am trying to get a multiple upload library working for my Codeigniter based
I have the following model(codeigniter) code to upload image and thumbnail. However the result
I am using Codeigniter with the TankAuth library installed and trying to upload to
I am trying to implement a multiple file upload script to codeigniter. the script
I am uploading a PDF using the codeigniter upload library, the PDF is uploaded
i'm using jCrop and CodeIgniter, trying to make an image uploader. So i have
In codeigniter I am creating an application that allows the user to upload multiple
im using the below code to upload multiple images, take the image file name,

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.