WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Using cURL to get login to yahoo.com by Porosh
Categories : PHP, CURL Click here to Update Your Picture
NUR-E-ALAM KHAN
Date : Dec 10th 2005
Grade : 4 of 5 (graded 6 times)
Viewed : 11373
File : 4277.php
Images : No Images for this code example.
Search : More code by NUR-E-ALAM KHAN
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?php
// Script created by Nur-E-Alam Khan
// Email: porosh@msn.com (Dhaka, Bangladesh)

$url ="http://login.yahoo.com/config/login?.src=ym&.intl=us&.partner=&.done=http%3A%2F%2Fmail.yahoo.com%2F";
$ch = curl_init();     
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt ($ch, CURLOPT_COOKIEJAR, '/temp/cookie.txt');
curl_setopt ($ch, CURLOPT_POSTFIELDS, "login=emailid&passwd=password&&submit=Sign In");
ob_start();     
curl_exec ($ch);
ob_end_clean(); 
curl_close ($ch);
unset(
$ch);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_COOKIEFILE, "/temp/cookie.txt");
curl_setopt($ch, CURLOPT_URL,"http://us.f515.mail.yahoo.com/ym/login?");
$result = curl_exec ($ch);

curl_close ($ch);
echo
$result;
?>



These PHP Classes Check if a host is alive using various methods.
Categories : PHP, PHP Classes, Sockets, CURL
Import the yahoo address book.
Categories : PHP, CURL, Authentication
Newbie Notes #8 - A cron trick
Categories : PHP, CURL, Beginner Guides
A function to check if a URL exists
Categories : PHP, CURL, HTTP
curl_close -- Close a CURL session
Categories : PHP, PHP Functions, CURL
Yahoo! Messenger Friend List
Categories : PHP, CURL, HTML and PHP
Amazon.com API, CURL-REST Parser. Obtain data about Amazon products (PHP5 +)
Categories : PHP, Ecommerce, XML, Web Services, CURL
Using cURL to download a file programmatically.
Categories : PHP, PHP Extensions, CURL
PHP Youtube Downloader - This is a set of PHP functions that can be used to download movies from Youtube.com.
Categories : PHP, CURL, Regexps
Returns Yahoo! Address Book and Messenger List as an Array
Categories : PHP, PHP Classes, CURL
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
Open remote https url using Curl and accept cookie
Categories : PHP, CURL
Link Manager for Link Exchangers
Categories : PHP, PHP Classes, Databases, MySQL, CURL
Sample AIM (Advanced Integration Method) PHP Script For Authorize.net using CURL
Categories : CURL, Ecommerce, PHP
Url To Pdf Report By Remote Application
Categories : PHP, PHP Classes, PDF, CURL
 NUR-E-ALAM KHAN wrote :1374
I forgot to write that you may need to change the URL according to your Email account url. I will submit another code which will detect the url automatically