Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on fopen of URL fails in the Shared & Semi-Dedicated forum
I'm trying to read a webpage to extract some video links. When I try to fopen the URL, it fails: $fp=fopen("http://msnbc.com/news/NIGHTLYTB_Front.asp","rb"); Warning: fopen( http://msnbc.com/news/NIGHTLYTB_Front.asp ) ...

  1. #1
    Aletia Refugee lvzardoz's Avatar
    Join Date
    Feb 2002
    Location
    Las Vegas
    Posts
    165

    Question fopen of URL fails

    I'm trying to read a webpage to extract some video links. When I try to fopen the URL, it fails:

    $fp=fopen("http://msnbc.com/news/NIGHTLYTB_Front.asp","rb");

    Warning: fopen(http://msnbc.com/news/NIGHTLYTB_Front.asp) [function.fopen]: failed to create stream: Invalid argument in /home/itvfan/public_html/tv/tv_nbc.php on line 11

    This is the first working URL that has failed like this. Anyone know why or have an alternate solution?

  2. #2
    Aletia Refugee lvzardoz's Avatar
    Join Date
    Feb 2002
    Location
    Las Vegas
    Posts
    165

    A Linux kludge solution

    Pending a more elegant solution, I'm going to use a Linux kludge:

    $result = shell_exec("wget -q -O - $url");

    This works but it is not the best solution.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •