tags:

views:

48

answers:

1

I have a php script which grabs a video's dynamic URL from its web location. When hosting the page on my localhost using apache, the URL for that video works, so the dynamic URL retrieved is the correct one. However , when I try to upload the files to http://online-dizi-film-izle.com/www/ ....the URL changes, and it becomes invalid.

Anyone kow why or how this happens ???

A: 

for ex..from stagevu[dot]com my code is like

<?php

    $html = fopen('http://stagevu.com/video/kcvfftzacooa', 'rb');

    $data = stream_get_contents($html);

    fclose($html);

    $pos = strpos($data, '<div id="embedcont'); 
    $startpos = strpos($data, '<object', $pos);
    $endpos = strpos( $data, "</object", $startpos + 9 );

    $data = substr($data, $startpos, $endpos + 9 - $startpos);

    $stpos = strpos($data, 'statusCallback'); 
    $ndpos = strpos($data, '/>', $stpos); 
    $data = str_replace(
        substr($data, $stpos, $ndpos - $stpos),
        'timeCallback" value="xxx" ', $data);

    $stpos = strpos($data, 'statusCallback="'); 
    $ndpos = strpos($data, '"', $stpos + 16); 
    $data = str_replace(
        substr($data, $stpos, $ndpos - $stpos + 1),'timeCallback="xxx"',
        $data);

    echo $data;

?>

when I test this on my localhost, code fetches video correctly and it plays in a divx web player..

but when I upload my files to online-dizi-film-izle[dot]com/www/ my code still fetches a video but not a valid video link..

I wonder why it works on my locahost but not works on site..

any idea ?

Thanks

eddai