From development machine (mac) there is no problem connecting via cURL in PHP to this, but in Ubuntu, I get this error. I’ve tried on a local machine and on an Amazon AWS instance. I’ve googled and googled and keep coming up to brick walls. There’s no firewall restrictions in place, its a complete mystery. php5-curl IS installed in ubuntu,
Tag: curl
Sending free sms using PHP
I am trying to develop a PHP based application to send sms across India to contacts picked from the database. After searching for hours, I found the following working (I tested it) script which makes …
Is it possible to get partial response using PHP cURL?
Here is my code $url = “partial_response.php”; $sac_curl = curl_init(); curl_setopt($sac_curl, CURLOPT_HTTPGET, true); curl_setopt($sac_curl, CURLOPT_URL, $url); curl_setopt($sac_curl, …
PHP cURL error 58
Need some help understanding the ubiquitous cURL 58 error, which is due to, in this case, including a PEM file with the cURL request. My code can successfully open the .pem file (see fopen() call) but cURL complains that it cannot set the private key file. Trying to better understand if this something on the client end (me) or something
Send Post request to Node.js with PHP cURL
I am trying to send a post request through PHP cURL to my node.js server to then emit a message to the client. The server is working and setup as follows: and my PHP is as follows: The console says that json.message is undefined. Why is it undefined? Answer You’re using querystring.stringify() incorrectly. See the documentation on querystring’s methods here:
PHP cURL/Socket and HTTP authentication
I have a webpage with a list of HTML links for images in a protected subfolder. This folder is protected via .htaccess and HTTP authentication. Is there a way to use cURL/Socket, or something like …
PHP cURL vs file_get_contents
How do these two pieces of code differ when accessing a REST API? and They both produce the same result, judging by Answer file_get_contents() is a simple screwdriver. Great for simple GET requests where the header, HTTP request method, timeout, cookiejar, redirects, and other important things do not matter. fopen() with a stream context or cURL with setopt are powerdrills
curl get remote file and force download at same time
I’m trying to get a remote file and force download it to user at the same time. I can’t paste the code ,the code is too long . but the curl function works ,but the problem is it doesn’t out put anything till it gets the remote file first then it force downloads it to user. I use this to
Website Scraping with PHP,Curl and MySQL Database
sorry am having bit of trouble here storing scraped content into MYSQL database. So what am trying to do is save the Module Code and Module Title from this site [http://www.ucc.ie/modules/descriptions/page014.html][1] into MYSQL database. Am able to get content from the site alright but I just cant seems to be able to save scraped content into database.I keep getting the
Web scraping in PHP
I’m looking for a way to make a small preview of another page from a URL given by the user in PHP. I’d like to retrieve only the title of the page, an image (like the logo of the website) and a bit of text or a description if it’s available. Is there any simple way to do this without