Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $uA = $_SERVER['HTTP_USER_AGENT'];
- $url = "http://site.ru/admin.php";
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_REFERER, $url);
- curl_setopt($ch, CURLOPT_COOKIEJAR,$_SERVER['DOCUMENT_ROOT'].'/cookiefile2.txt');
- curl_setopt($ch, CURLOPT_USERAGENT, $uA);
- curl_setopt($ch, CURLOPT_POST,1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
- curl_setopt($ch, CURLOPT_USERPWD, "jugger:12345");
- curl_exec($ch);
- curl_close($ch);
- $uA2 = $_SERVER['HTTP_USER_AGENT'];
- $url2 = "http://site.ru/addnews";
- $ch2 = curl_init($url2);
- curl_setopt($ch2, CURLOPT_REFERER, $url2);
- curl_setopt($ch2, CURLOPT_USERAGENT, $uA2);
- curl_setopt($ch2, CURLOPT_POST,1);
- curl_setopt($ch2, CURLOPT_COOKIEJAR,$_SERVER['DOCUMENT_ROOT'].'/cookiefile2.txt');
- curl_setopt($ch2, CURLOPT_POSTFIELDS, "title=тест007&short_story=тест008&full_story=тест009");
- curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch2, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
- curl_setopt($ch2, CURLOPT_USERPWD, "jugger:12345");
- curl_exec($ch2);
- curl_close($ch2);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement