uawdijnntqw1x1x1
IP : 3.138.34.89
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
public_html
/
..
/
public_html
/
wp-content
/
plugins
/
wp-automatic
/
.
/
inc
/
class.apify.php
/
/
<?php class ValvePress_APIFY { public $token; public $link; public $ch; private $json_raw; function __construct($token, $link,$ch){ $this->json_raw = file_get_contents( dirname(__FILE__) . '/apify-template.json' ); $this->token = $token; $this->link = $link; $this->ch = $ch; } function apify(){ //empty reply if(trim($this->token) == '' ){ throw new Exception( '<span style="color:red">ERROR: You have enabled the option to use APIFY.COM, please visit the plugin settings page and add the required APIFY API token</span>' ); } $json_to_post =str_replace('https://www.example.com', $this->link, $this->json_raw); $curlurl="https://api.apify.com/v2/acts/apify~web-scraper/run-sync-get-dataset-items?token=" . $this->token; curl_setopt($this->ch, CURLOPT_URL, $curlurl); curl_setopt($this->ch, CURLOPT_POST, true); curl_setopt($this->ch, CURLOPT_POSTFIELDS, $json_to_post ); curl_setopt($this->ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json") ); $x='error'; $exec=curl_exec($this->ch); $x=curl_error($this->ch); //empty reply if(trim($exec) == '' ){ throw new Exception( 'Empty reply from APIFY ' . $x ); } $json = json_decode($exec); //error if( isset($json->error) ){ throw new Exception( 'Error from APIFY ' . $json->error->message ); } //no content pageContent if( ! isset($json[0]->pageContent) ){ throw new Exception( 'No content returned from APIFY ' ); } //hotfix for feed encoded html entities <?xml if(stristr( $json[0]->pageContent , '<?xml ')){ $json[0]->pageContent = html_entity_decode($json[0]->pageContent); } return $json[0]->pageContent; } }
/home/sudancam/public_html/../public_html/wp-content/plugins/wp-automatic/./inc/class.apify.php