0

I keep getting an error every time I run this php, not sure if I did something wrong. Can someone shed some light please?

<?php
$key = 'hassan!2016Key';
$ip = isset($_SERVER['HTTP_X_REAL_IP']) && $_SERVER['HTTP_X_REAL_IP'] ? $_SERVER['HTTP_X_REAL_IP'] : $_SERVER['REMOTE_ADDR'];
$expired = time() + 86400;
$md5 = base64_encode(md5($key . $ip . $expired, true));
$md5 = strtr($md5, '+/', '-_');
$md5 = str_replace('=', '', $md5);
$link = "http://104.218.55.84:8080/hls/$channelname.m3u8?token=$md5&e=$expired”;
?>

I saved that as php, uploaded to my website, but keeps getting an error.

placed it in my website www.dollarbills.esy.es/wp-content/themes/beetube/authorize.php when i enter that on browser i am getting the following error

Parse error: syntax error, unexpected end of file in /home/u254779895/public_html/wp-content/themes/beetube/authorize.php on line 11

  • 2
    What exactly is the error you are getting? Please [edit] and include that information in your question. – user812786 Mar 10 '16 at 19:22
  • Also, you have wrong closing quotation mark on the pre-last line – Przemek Mar 10 '16 at 19:24
  • this is the location i placed it in my website http://dollarbills.esy.es/wp-content/themes/beetube/authorize.php when i enter that on browser i am getting the following error Parse error: syntax error, unexpected end of file in /home/u254779895/public_html/wp-content/themes/beetube/authorize.php on line 11 – Hassan Sharif Mar 10 '16 at 19:27
  • You're using funky quotes on your last line. – John Conde Mar 10 '16 at 19:53

0 Answers0