How to grab page needs session plz some1 tell me the code
Grab page needs session
Collapse
X
-
I know i must use curl but how to set the session?
Please tell me whats worng at that code
PHP Code:<?
$ch = curl_init('http://mig33.com/sites/index.php?c=chatroom&v=midlet&a=setup_moderators&roomName='.$room);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1 (http://www.googlebot.com/bot2.html)');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$text = curl_exec($ch);
curl_close($ch);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
echo $text;
?>
Comment
-
that code not working too
PHP Code:<?
$ch = curl_init('http://mig33.com/sites/index.php?c=chatroom&v=midlet&a=setup_moderators&roomName=egypt-kisses');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1 (http://www.googlebot.com/bot2.html)');
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$text = curl_exec($ch);
curl_close($ch);
echo $text;
?>
its not flood tool or ileagl script...
Comment
-
Code:<?php $strCookie = 'PHPSESSID=' . $_COOKIE['PHPSESSID'] . '; path=/'; session_write_close(); $ch = curl_init('http://mig33.com/sites/index.php?c=chatroom&v=midlet&a=setup_moderators&roomName=egypt-kisses'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1 (http://www.googlebot.com/bot2.html)'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt( $ch, CURLOPT_COOKIE, $strCookie ); $text = curl_exec($ch); curl_close($ch); echo $text; ?>
Comment
Comment