<?php $ch = curl_init('http://xxx/news.php'); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch,CURLOPT_POST,1); curl_setopt($ch,CURLOPT_POSTFIELDS,"user_name=xxxi&user_pass=xxx&login=Login"); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, $ch); curl_setopt($ch, CURLOPT_COOKIE, "fusion_user=xxx; expires=Thu, 28 Feb 2008 17:43:25 GMT; path=/ "); curl_close($ch); ?>
wszystko jest ok jeżeli ręcznie wpisze indyfikator sesji w fusion_user,lecz jak to zrobić aby skrypt sam sobie odczywał tą wartość