Want to try and fix my wisevid embed PHP script?

Discussion in 'PHP & Perl' started by islandman1010, Jul 3, 2010.

  1. islandman1010

    islandman1010 Elite Member

    May 10, 2008
    Likes Received:
    I have got the moviemoneymaker embed script which I bought and it has worked well for a long time. Now it seems to have stopped working and is throwing a lot of error messages into my error log and they all seem to lead to the script now trying to open the wrong port at wisevid. So my guess is they have changed that. However the script writer doesnt seem to be around anymore and they dont answer support emails. I know nothing about how to edit the script and make sure it connects to the right port. Anyone want to do this for me? The errors look like this

    [02-Jul-2010 10:15:00] PHP Warning: fgets(): supplied argument is not a valid stream resource in /home/MYNAME/public_html/MYSITE.COM/vidembed/wisevidstr.php on line 121

    The lines around line 121 are

    function headToHost($host, $path,$cookie="") {
    $fp = fsockopen($host,80);
    $header = "";
    fputs($fp, "GET $path HTTP/1.1\n" );
    fputs($fp, "Host: $host\n" );
    //fputs($fp, "Cookie: $cookie\n" );
    fputs($fp, "Connection: keep-alive\n\n" );
    while (!feof($fp)) {
    $data = fgets($fp, 4096);

    $header .= $data;

    Thanks for any help.
  2. Bots_Do_it_Faster

    Bots_Do_it_Faster Registered Member

    Jun 28, 2010
    Likes Received:
    Web Developer php and c#
    South Florida
    Your error message is not nessesarily a port issue. It could just as easily be the site has changed the path being used to prevent the videos from being ripped. I have run into this along with other tricks that youtube and several of the other video sites use to block scripts like this.

    If you can post what data is being sent to the function when it fails I'd be glad to confirm this for you.