Собственный прокси на PHP+cURL за 5 минут

На http://www.rucoder.ru нашел интересную информацию по поводу накрутки счетчиков на сайтах и тому подобного. Суть проста — на своем сервере сидит php-скрипт, который «заходит» на нужный сайт, считывает с него страничку и отправляет нам. Для этого дела используется библиотека cURL. Вот простой пример с RuCoder’а:

< ?php
    //Поехали!
    $handle = curl_init();
    //$url - куда путь держим
    curl_setopt($handle, CURLOPT_URL, $url);
    //Возвращаем результат
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
    //Пришли с гугла :D
    curl_setopt($handle, CURLOPT_REFERER, 'http://google.com/');
    //Ходим по редиректам
    curl_setopt($handle, CURLOPT_AUTOREFERER, 1);
    //наш прокси сервер в формате 127.0.0.1:8080
    curl_setopt($handle, CURLOPT_PROXY, $proxy_host);
    //Открываем страничку и пишем всё в переменную
    $data = curl_exec($handle);
    //закрываем сеанс
    curl_close($handle);
 
    echo $data;
?>

Я вот думаю — а что, если написать скрипт, который бы принимал параметры cURL от пользователя? Малюем небольшую формочку с полями «какой сайт посещаем» и «с какого реферера», куда вбиваем необходимые данные и наслаждаемся 🙂

1 359 комментариев

  1. Voters amended the state’s structure in Nov.
    2020 to allow retail sports betting in town limits of Deadwood,
    with those sportsbooks opening Sept. Retail sports betting is now out there at a
    number of Deadwood casinos by way of operators that include BetMGM and major slots operator
    AG Trucano. The modification proposed in Senate Joint Resolution 502 would
    allow South Dakotans to vote this Nov. 8 to legalize cell and online sports betting statewide through servers
    based mostly in the town of Deadwood. Mobile sports betting in South Dakota may very well be
    on the way in which beneath a constitutional modification proposed for the 2022 fall ballot.
    Mobile and online sports betting would be
    allowed both «within and outside town limits» of Deadwood under the proposal.
    But the servers processing bets would be situated in Deadwood.
    That amendment legalized sports betting in Deadwood
    particularly. It is unclear if the proposed
    amendment might meet a authorized problem, should
    it’s approved by lawmakers for the ballot this 12 months.

  2. Howdy are using WordPress for your site platform? I’m new to
    the blog world but I’m trying to get started and create
    my own. Do you require any coding expertise to make your
    own blog? Any help would be greatly appreciated!

  3. You really make it appear really easy with your presentation but
    I find this topic to be actually one thing which I
    believe I might never understand. It sort of feels too complex and very vast for me.
    I’m taking a look forward for your subsequent post, I’ll try to get the
    hold of it!

  4. Turkey Hair Expert provides high quality
    and safe hair transplant in Turkey at its contracted premier clinic,
    using the most advanced techniques and technologies. With a patient-centric and
    ethical approach, Turkey Hair Expert offers high-quality hair transplantation in Turkey with its experienced doctors and medical team.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *