Solved

cURL returns bool(false) after execution -- Never happened before

Posted on 2009-04-15
1
199 Views
Last Modified: 2012-05-06
Hello everyone.

I put together a cURL setup that was working about a week ago and now it is not.  I am wondering if I am doing something wrong to prompt this.  The script hits a URL that is supposed to upload some XML.  When I hit the URL manually, the update on the XML works fine.  However, when I try to hit it via cURL, I just get back a bool(false) when I do a var_dump on the $data variable.

Any ideas as to what could possibly be wrong?

            
$ch = curl_init();
$url = "link to whatever";
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
$data = curl_exec($ch);
curl_close($ch);

Open in new window

0
Comment
Question by:Minnickweb
1 Comment
 

Accepted Solution

by:
Minnickweb earned 0 total points
ID: 24149250
Figured it out.  Found a very nice troubleshooting cURL script that helped me detect that the problem was with the URL :)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question