How can I include javascript in my php file? [on hold]

December 18, 2018, at 10:50 PM

I'm trying to clone subscene website with those php codes 'casue this site is ban in my country. everything is ok except one thing, TogglePreview is'nt working.if you open this link and switch between "Subtitle details" and "Preview" you see it's work but here in my clone website don't I'm looking for a is my PHP code for clone subscene website

$ckfile = '/tmp/simpleproxy-cookie-'.session_id();
$cookiedomain = str_replace("http://www.","",base64_decode('aHR0cHM6Ly9zdWJzY2VuZS5jb20='));
$cookiedomain = str_replace("https://www.","",$cookiedomain);
$cookiedomain = str_replace("www.","",$cookiedomain);
$url = base64_decode('aHR0cHM6Ly9zdWJzY2VuZS5jb20=') . $_SERVER['REQUEST_URI'];
if($_SERVER['HTTPS'] == 'on'){
    $mydomain = 'https://'.$_SERVER['HTTP_HOST'];
} else {
    $mydomain = 'http://'.$_SERVER['HTTP_HOST'];
$curlSession = curl_init();
curl_setopt ($curlSession, CURLOPT_URL, $url);
curl_setopt ($curlSession, CURLOPT_HEADER, 1);

    curl_setopt ($curlSession, CURLOPT_POST, 1);
    curl_setopt ($curlSession, CURLOPT_POSTFIELDS, $_POST);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curlSession, CURLOPT_TIMEOUT,30);
curl_setopt($curlSession, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curlSession, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($curlSession, CURLOPT_COOKIEJAR, $ckfile); 
curl_setopt ($curlSession, CURLOPT_COOKIEFILE, $ckfile);
foreach($_COOKIE as $k=>$v){
        $v = serialize($v);
    curl_setopt($curlSession,CURLOPT_COOKIE,"$k=$v; domain=.$cookiedomain ; path=/");
$response = curl_exec ($curlSession);
if (curl_error($curlSession)){
        print curl_error($curlSession);
} else {
    $response = str_replace("HTTP/1.1 100 Continue\r\n\r\n","",$response);
    $ar = explode("\r\n\r\n", $response, 2); 

    $header = $ar[0];
    $body = $ar[1];
    $header_ar = split(chr(10),$header); 
    foreach($header_ar as $k=>$v){
            $v = str_replace(base64_decode('aHR0cHM6Ly9zdWJzY2VuZS5jb20='),$mydomain,$v); //header rewrite if needed
    $body = str_replace(base64_decode('aHR0cHM6Ly9zdWJzY2VuZS5jb20='),$mydomain,$body);
    $body = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $body);
    print $body;
curl_close ($curlSession);
Rent Charter Buses Company
Display list of custom post type in Wordpress Gutenberg custom block

Display list of custom post type in Wordpress Gutenberg custom block

I'm trying to enable users of my Wordpress plugin/theme, which uses a custom post type to handle products, to make a block that displays a summary of one of these custom postsI'm trying to accomplish this by creating a custom block in my plugin, based on the official...

Event when activity progress is updated

Event when activity progress is updated

I am using moodle 33

Angular 7 Laravel 5.7 set-cookies is not possible

Angular 7 Laravel 5.7 set-cookies is not possible

I work on Single Page Application in Angular 7, and for REST server I use Laravel 57

How Get Visitor&#39;s Original IP? [duplicate]

How Get Visitor's Original IP? [duplicate]

This question already has an answer here: