Merhaba. İlk önce yapmanız gereken login formunun post edidiği urlyi görmek. Ardından curl ile o url adresine kullanıcı adı ve parolayı post etmeniz gerekli. Bu işlemleri yaptığınızda karşı sitede sizin için bir session oluşur, bu session açık olduğu sürece oturumunuz açık demektir. Curl'de sessionun kapanmaması için CURLOPT_COOKIEJAR ve CURLOPT_COOKIEFILE özelliklere ihtiyacınız olacak. Biraz karışık oldu bir örnek vereyim.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://site.com/login.php');curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "username=kullanici_adi&password=parola");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIESESSION, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, '');
curl_setopt($ch, CURLOPT_COOKIEFILE, '');
$response = curl_exec($ch);// ilk giriş işlemimizi tamamladık, karşı site bizi giriş yapmış olarak görüyor.
curl_setopt($ch, CURLOPT_URL, 'http://site.com/veri');
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, "");
$sonuc = curl_exec($ch);
// $sonuc değişkeni çekmek istediğimiz veri