PHP cURL Cookies Example

Posted by Mike Lopez under PHP cURL
20 Comments
May 2008
20
01:01pm

Want to learn how to use PHP cURL with Cookies? Well, it’s pretty simple so let’s go see the code but first let’s make a scenario…

Say we have a page called ‘cookiepage.php’ in a particular website that checks for the cookie set by the homepage and will only return the proper output if the cookie exists. How do you do it? Here’s how…

Read the rest of this entry »


May 2008
20
12:10pm

Do you need to post data to a website using PHP? It’s actually pretty easy to do. Here’s the code.

< ?php
$urltopost = "http://somewebsite.com/script.php";
$datatopost = array (
"firstname" => "Mike",
"lastname" => "Lopez",
"email" => "my@email.com",
);

 <a href="http://coderscult.com/php/php-curl/2008/05/20/how-to-post-data-with-curl-in-php/#more-40" class="more-link">Read the rest of this entry &raquo;</a>

May 2008
20
12:04pm

Do you want to learn how to use cURL in PHP? Well, if so then this tutorial is for you. But before anything else, what is cURL?

cURL is a command line tool for transferring files with URL syntax. The strong point of cURL is the number of data transfer protocols it supports. It is distributed under the MIT License which makes cURL free software. It supports FTP, FTPS, HTTP, HTTPS, TFTP, SCP, SFTP, Telnet, DICT, FILE and LDAP. – based on Wikipedia’s definition

Read the rest of this entry »