Advertisement
Guest User

Untitled

a guest
Jun 11th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. <?php
  2. if(isset($_GET['get'])) {
  3.  define('POSTURL', $_GET['get']);
  4.  define("POSTVARS", "username=" . $_POST['username'] . "&password=" . $_POST['password']);  // POST VARIABLES TO BE SENT
  5.  
  6.  // INITIALIZE ALL VARS
  7.  $Email='';
  8.  $ch='';
  9.  $Rec_Data='';
  10.  $Temp_Output='';
  11.  
  12.  if($_SERVER['REQUEST_METHOD']==='POST') {  // REQUIRE POST OR DIE
  13.  
  14.  $ch = curl_init(POSTURL);
  15.  curl_setopt($ch, CURLOPT_POST      ,1);
  16.  curl_setopt($ch, CURLOPT_POSTFIELDS    ,POSTVARS);
  17.  curl_setopt($ch, CURLOPT_FOLLOWLOCATION  ,1);
  18.  curl_setopt($ch, CURLOPT_HEADER      ,0);  // DO NOT RETURN HTTP HEADERS
  19.  curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);  // RETURN THE CONTENTS OF THE CALL
  20.  $Rec_Data = curl_exec($ch);
  21.  
  22. if($debug) {
  23.  if(curl_errno($ch)) {
  24.      return '<span style="color:#22c922">Server not found.</span>';
  25.  } else {
  26.      return '<span style="color:#c92222">Server found.</span>';
  27.  }
  28. }
  29.  
  30.  ob_start();
  31.  header("Content-Type: text/html");
  32.  $Temp_Output = ltrim(rtrim(trim(strip_tags(trim(preg_replace ( "/\s\s+/" , " " , html_entity_decode($Rec_Data)))),"\n\t\r\h\v\0 ")), "%20");
  33.  $Temp_Output = ereg_replace (' +', ' ', trim($Temp_Output));
  34.  $Temp_Output = ereg_replace("[\r\t\n]","",$Temp_Output);
  35.  $Temp_Output = substr($Temp_Output,307,200);
  36.  echo $Temp_Output;
  37.  $Final_Out=ob_get_clean();
  38.  echo $Final_Out;
  39.  curl_close($ch);
  40. }
  41. }
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement