why do i get Notice: Undefined offset: 65 and how to fix it
<p>I keep getting this <code>Notice: Undefined offset: 65</code> on line 31 which is this line <code>if($k[$c]) $p = preg_replace('/\b'.base_convert($c, 10, $a).'\b/', $k[$c], $p);</code>. How can I fix this?</p>

<pre><code>//function to get source html
function get_data($url) {
    $curl_handle=curl_init();
    curl_setopt($curl_handle,CURLOPT_URL,$url);
    curl_setopt($curl_handle,CURLOPT_TIMEOUT,10);
    curl_setopt($curl_handle,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
    curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,10);
    curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
    $html = curl_exec($curl_handle);
    curl_close($curl_handle);

    return $html;
}

//function to extract string beteen 2 delimeters
function extract_unit($string, $start, $end) {
    $pos = stripos($string, $start);
    $str = substr($string, $pos);
    $str_two = substr($str, strlen($start));
    $second_pos = stripos($str_two, $end);
    $str_three = substr($str_two, 0, $second_pos);
    $unit = trim($str_three);

    return $unit;
}

//function to decode packer endcoding
function js_unpack($p,$a,$c,$k) {
  while ($c--)
    if($k[$c]) $p = preg_replace('/\b'.base_convert($c, 10, $a).'\b/', $k[$c], $p);

  return $p;
}

//url source;
$adcrunch = get_data("http://adcrun.ch/BuVE");

//gather js_packer arguments
$arg_p = extract_unit($adcrunch, 'return p}(\'', ';\',');
$arg_a = extract_unit($adcrunch, '});\',', ',');
$arg_c = extract_unit($adcrunch, ',10,', ',\'|a0x1');
$arg_k = extract_unit($adcrunch, ',\'|', '\'.split');

$p = $arg_p;
$a = $arg_a;
$c = $arg_c;
$k = explode('|', $arg_k);

echo js_unpack($p, $a, $c, $k);
</code></pre>
