Grab page needs session

Started on the old forum in March 2011 · view the original in the archive · old links redirect here

11 replies · 929 views · started 15 years ago · 1 min read

5 participants
atef Developer · 224 posts #3

I know i must use curl but how to set the session? Please tell me whats worng at that 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; 
?>
something else Fellow · 2,296 posts #4

oh flooding tools for mig33 ..........

Sorry but your going to have to figure this out on your own as im not contributing to such script

frostymarvelous Senior · 266 posts #6

Set all the options before you call exec()

Otherwise, the cookie settings won't be set.

Move $text = curl_exec ($ch); to the the bottom just before echo.

Already told you I could do this script easy.Well, goodluck!

Perfection comes at a cost

I accept liberty!

atef Developer · 224 posts #7

that code not working too

<?
$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; 
?>

please give me the right code its not flood tool or ileagl script...

soul_reaper Developer · 83 posts #9
<?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; 
?>

try this..

The LORD is my shepherd, i shall not be in want. He makes me lie down in green pastures, he leads me beside quiet waters, he restore my soul. He guides me in path of righteousness for his name's sake. Even though i walk through the valley of shadow of death, i will fear no evil for you are with me.

mayurss786 Developer · 137 posts #11

i also need this plz help us.....

and can any one share that code which is using for disable a grabber after using it grabber shows Document has moved here

sorry bad english...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close