Skip to content
Advertisement

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 …

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 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

Advertisement