File "run.php"

Full Path: /www/wwwroot/shphe-en.com/trans/run.php
File size: 773 bytes
MIME-type: --
Charset: utf-8

<?php
// include("translate.php");
// header('Access-Control-Allow-Origin:*'); 
 $domain = $_GET["domain"];
// register_shutdown_function([new Translate(),"handle"],$domain);

// fastcgi_finish_request();
$host = "127.0.0.1";   
$port = 9502;   
//$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)or die("Could not create  socket\n");   
      
//$connection = socket_connect($socket, $host, $port) or die("Could not connet server\n");  



$client = fsockopen("tcp://127.0.0.1",9502);



    $data = ["domain"=>$domain];
    $data["docmentRoot"] = dirname(dirname(__FILE__));
    //socket_write($socket, json_encode($data)) or die("Write failed\n");  
   // $client->send(json_encode($data));
    fwrite($client,json_encode($data));
  


?>