config root man

Current Path : /home/eurarchive/public_html/

Linux host.eurweb.com 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64
Upload File :
Current File : /home/eurarchive/public_html/checkart.php

<?php
function check_post($id,$rpcurl,$username,$password) {

$content = array('custom_fields');	

    $params = array(0,$username,$password,$id,$content);
    $request = xmlrpc_encode_request('wp.getPost',$params);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
    curl_setopt($ch, CURLOPT_URL, $rpcurl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 1);
    $results = curl_exec($ch);
    curl_close($ch);
    return $results;	

}

$fieldsids=check_post("131490","http://stage.music.com/xmlrpc.php","davidl","zeratul87");
echo $fieldsids;
$stack = array();
$xml = simplexml_load_string($fieldsids);
foreach ($xml->params->param->value->struct->member as $dataSet) {
    foreach ($dataSet->value->array->data->value as $member) {
	if ($member->struct->member->name == "id"){
		$fieldid= $member->struct->member->value->string;
array_push($stack,(string)$fieldid);
	}
    }   
    echo PHP_EOL;                                                                                                                                                     
}

print_r($stack);

?>

Man Man
EURweb ‹ Log In

EURweb

← Back to EURweb