Skip to content

Instantly share code, notes, and snippets.

@carbolymer
Created August 12, 2010 09:52
Show Gist options
  • Save carbolymer/520654 to your computer and use it in GitHub Desktop.
Save carbolymer/520654 to your computer and use it in GitHub Desktop.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://spamsoft.pl/quotedev/login.php?login");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIESESSION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://spamsoft.pl/quotedev/index.php');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/__cookie');
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/__cookie');
curl_exec($ch);
curl_setopt($ch, CURLOPT_URL, "http://spamsoft.pl/quotedev/login.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=Pieter&password=papierek222&login=0');
echo curl_exec($ch);
curl_close($ch);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment