PDA

View Full Version : دیکد کرد یک فایل php



masterphp
پنج شنبه 10 مرداد 1392, 19:00 عصر
سلام
من یه فایل php دارم کد شده میخوام دیکد کنم
فایل هم ضمیمه میکنم براتون
اگر کمک کنید ممنون میشم

a_ahmadi
پنج شنبه 10 مرداد 1392, 20:34 عصر
<?php



class sabapayamak
{
private $errors;
private $_user; //Sabapayamak account username
private $_pass; //Sabapayamak account password

function __construct($user, $pass)
{
$this->_user = $user;
$this->_pass = $pass;
}
// Send a HTTP Queries through sockets
private function SendSocketHTTP($page,$QueryString)
{
// init infos
// Build HTTP Header
$header = 'POST' . " " . $page . " HTTP/1.1\r\n";
$header .= "Host: " . 'www.sabapayamak.com' . "\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " .strlen($QueryString) . "\r\n";
$header .= "Connection: close\r\n\r\n";
$header .= $QueryString . "\r\n";

// Socket connection
$socket = fsockopen( 'www.sabapayamak.com' , 80, $errno, $errstr);

if($socket) // if we're connected
{
fputs($socket, $header); // Send header
while(!feof($socket))
{
$response[] = fgets($socket); // Grab return codes
}
fclose($socket);
}
else
{
$response = false;
}
return ($response[10]);
}



private function BuildQS($args)
{
$qs = '';
$countArgs = 1;
foreach ($args as $key => $value)
{
$qs .= $key . '=' . $value;
if ($countArgs < sizeof($args))
$qs .= '&';
$countArgs++;
}
return $qs;
}



###########################################

# Public Methodes #

###########################################


public function GetCredit() // Return account credit
{
$Qs= array(
'username' => $this->_user,
'password' => $this->_pass
);
return $this->SendSocketHTTP('/Post/GetCredit.ashx',$this->BuildQS($Qs));
}

public function Send($from,$to,$msg,$isFlash) //Send msg text
{
$Qs =array(
'username' => $this->_user,
'password' => $this->_pass,
'from' => $from,
'text' => urlencode($msg),
'flash' => $isFlash
);

$fields=$this->BuildQs($Qs);

return $this->SendSocketHTTP('/Post/SendSms.ashx',$fields.'&To='.$to); //return result of request



}


}
?>

منبع :
http://decoder.iwebz.org/