Advertisement
thimo

tshirtfamily.fr CURL Sample

Mar 19th, 2018
896
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?php
  2. $user_agent = 'test/1.0 (http://tshirtfamily.fr/; test@mail.de)';
  3. ini_set('user_agent', $user_agent);
  4.  
  5. $site_url = htmlspecialchars($_POST['url']);
  6.  $design = [];
  7.  
  8.  $ch = curl_init();
  9.  curl_setopt($ch, CURLOPT_URL, $site_url);
  10.  curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
  11.  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12.  curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
  13.  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  14. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  15.  $resultat = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement