Is post me apko btaya jayaega ki kis prakar ham Curl ka use karke apne gmail account me login kar sakte hai.
<?php
if(isset($_POST['submit']))
{
$curl = curl_init();//initalization
curl_setopt($curl, CURLOPT_URL, "https://mail.google.com/mail/feed/atom");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_USERPWD, $_POST['gmailid'] . ":" . $_POST['password']);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_ENCODING, "");
$curlData = curl_exec($curl);
curl_close($curl);//close
$emails = new SimpleXmlElement($curlData);
foreach($emails->entry as $entry)
{
echo $entry->title;
echo "<br>";
echo $entry->description;
echo "<br>";
echo $entry->summary;
}
}
?>
<br>
<br>
<a href="#">home</a></br>
<h1> Gmail Login With Curl</h1>
<form method="post" action="">
<input type="text" name="gmailid">
<input type="text" name="password">
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
Thank You
Team Gajabwap web in hindi
1 comments:
Click here for commentsnice article bro....... please use better images in blog post and your blog is 75 percent good I like it please modify it
ConversionConversion EmoticonEmoticon