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 7934695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:42:49+00:00 2026-06-03T21:42:49+00:00

There is a CURL functionality that i’d been using to fetch image from a

  • 0

There is a CURL functionality that i’d been using to fetch image from a url and save it to m server, since COPY() was disabled from my hosting .

the url i passed was $url=http://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/People_from_Switzerland.png/285px-People_from_Switzerland.png

    $headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg';              
$headers[] = 'Connection: Keep-Alive';         
$headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8';   
$userAgent = 'php';
$process = curl_init($url);
curl_setopt($process, CURLOPT_HTTPHEADER, $headers);         
curl_setopt($process, CURLOPT_HEADER, 0);         
curl_setopt($process, CURLOPT_USERAGENT, $useragent);         
curl_setopt($process, CURLOPT_TIMEOUT, 30);         
curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);         
curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

And I get the following error when i tried to echo the curl_init($url) output

process Resource id #7
Warning: curl_setopt() expects parameter 1 to be resource, null given in
Warning
: curl_errno() expects parameter 1 to be resource, null given in

Please Help!

  • 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-03T21:42:50+00:00Added an answer on June 3, 2026 at 9:42 pm

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    Where does the $ch come from, you use $process before, is the last line copied from other place?

    The undefined variable will be null.

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

Sidebar

Related Questions

Is there a way to add the url you are using in curl to
Is there any opensource tool built using cURL that downloads a single webpage and
I want to POST an URL using CURL and php. There is a big
I am using cURL to retrieve a file from a server, I wonder is
There seem to be very different opinions about using transactions for reading from a
I'm working on a project that involves uploading an image to tumblr from Python.
Is there a way to execute curl from Javascript? Thanks.
When using the PHP curl functions, is there anyway to see the exact raw
Is there any way of limiting the amount of data CURL will fetch? I'm
There are a few PHP extensions (such as cURL) that are disabled by default

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.