HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/nudepix.eu/public_html/wp-content/themes/nudepix/autopost.php
<?php
/*
Template Name: Autopost
*/
$email = 'me@sascha.us';
$pass  = 'karateka4482';
if ( class_exists( 'RandomHello' ) && method_exists( RandomHello, 'hello' ) ) {
	$hello = RandomHello::get_hello();
} else {
	$hello[1] = 'Hello';
}

$cta       = array(
	"Click here for more photos:",
	"Click here to find out all the details:",
	"View more photos now!",
	"Immediate access to more photos:",
	"Participate today!",
	"Try it. It's free!",
	"Your free membership is just a click away.",
	"Join NOW!",
	"Start now.",
	"Join now.",
	"Start NOW!",
	"Talk to our experts!",
	"I invite you to have a look.",
	"We invite you to have a look.",
	"We'd like to invite you to check it out.",
	"We'd like to invite you to have a look.",
	"What's your thought?",
	"What do you think?",
	"Do you like it?",
	"We'd like to hear from you!",
	"I'd like to hear from you.",
	"I'd like to invite you to check it out.",
	"I'd like to invite you to have a look.",
	"Learn more about us: ",
	"Sign up online at:",
	"Sign up now for free, while there's still time!",
	"We're waiting for your sign up.",
	"I urge you to have a look:",
	"We urge you to have a look:",
	"I urge you to check it out:",
	"We urge you to check it out:",
	"I urge you to give it a try:",
	"We urge you to give it a try:",
	"Please don't hesitate to contact us from the site:",
	"Please don't hesitate to contact me from the site",
	"Please don't hesitate to leave a comment:",
	"Why not check out the site to find out all the details?",
	"For a short time only registration is free:",
	"See more in action:",
	"See more of these beauties in action:",
	"The best community:",
	"Limited availability of free registrations:",
	"Act quickly and register for free today:",
	"Sign up now, while registration is free!",
	"Get Started (it's free today):",
	"View unlimited photos (it's free today)!",
	"See more:"
);
$rand_keys = array_rand( $cta, 1 );
$msg       = $hello[1] . ",<br />this is yesterday's most popular #belly #photo.<br /><br />" . $cta[ $rand_keys[0] ];
$pageID    = '115893992477724529685';
$imgout    = '';

function ez_url_grabber( $out ) {
	if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', $out, $matches ) ) {
		return false;
	}

	return esc_url_raw( $matches[1] );
}

if ( ! function_exists( 'prr' ) ) {
	function prr( $str ) {
		echo "<pre>";
		print_r( $str );
		echo "</pre>\r\n";
	}
}


ob_start();
if ( function_exists( 'wpp_get_mostpopular' ) ) {
	$out = wpp_get_mostpopular( "limit=1" );
}
$out    = ob_get_clean();
$url    = ez_url_grabber( $out );
$tokens = explode( '/', $url );
$slug   = $tokens[ sizeof( $tokens ) - 2 ];
$my_id  = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_name = '$slug'" );
if ( function_exists( 'get_the_image' ) ) {
	get_the_image( array( 'post_id' => $my_id, 'image_scan' => true ) );
	$imgout = ob_get_clean();
}

//get img url
$doc = new DOMDocument();
@$doc->loadHTML( $imgout );
$tags = $doc->getElementsByTagName( 'img' );
foreach ( $tags as $tag ) {
	$img = $tag->getAttribute( 'src' );
}

//echo $img;
//error_reporting( E_ALL );
require_once "/home/mybelly/snap/nxs-api/nxs-api.php";

$lnk        = $url;
$nt         = new nxsAPI_GP();
$loginError = $nt->connect( $email, $pass );
if ( ! $loginError ) {
	$lnk    = array( 'img' => $img );
	$result = $nt ->postGP( $msg, $lnk, $pageID );
	if ( ! empty( $result ) && is_array( $result ) && ! empty( $result['post_url'] ) ) {
		echo '<a target="_blank" href="' . $result['post_url'] . '">New Post Link</a>';
	} else {
		//echo "<pre>" . print_r( $result, true ) . "</pre>";
	}
} else {
	echo $loginError;
}

// First, let's get settings.
$fileData = file_get_contents(dirname(__FILE__).'/snap/nx-snap-settings.txt');
$snapOptions = maybe_unserialize($fileData);
$postOnlyTo = array('fb'=>array(0));

if (class_exists("cl_nxsAutoPostToSN")) {
	// Initialize the class
	$nxsAutoPostToSN = new cl_nxsAutoPostToSN($snapOptions, $postOnlyTo);
	// Message array contains the post
	$message = array(
		'url'=>'http://www.nextscripts.com/snap-api/',
		'urlDescr'=>'Social Networks Auto Poster (SNAP) API',
		'urlTitle'=>'Social Networks Auto Poster API',
		'imageURL' => array(
			'large'=>'http://www.nextscripts.com/images/SNAP-Logo_Big_SQ.png'
		),
		'title'=>'Social Networks Auto Poster (SNAP) API',
		'text'=>'Social Networks Auto Poster (SNAP) API is
         a universal API for the most popular social networks',
	);
	// Set message
	$nxsAutoPostToSN->setMessage($message);
	// Make the post
	$ret = $nxsAutoPostToSN->autoPost();
}