View Single Post
Old 06-01-2006, 05:56 PM   #1 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 151
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
file() and fopen() not loading entire file

I'm building a GUI for my remote winamp script (which uses Victor Pavlov's Snowcrash plugin)

The problem I'm running into is that I can't seem to load the entire playlist (over 2600 titles) into an array. I usually get a mere 60-70 titles loaded then it just stops. It usually stops reading half-way through a title name too, as you can see here

It's supposed to load this page into an array.

The only thing I could think of was that maybe arrays are only allowed to contain a certain number of characters? I did a character count on 5 different playlists, and the range of characters was pretty tight. Between 2560 and 2580 characters are loaded into the array before it quits reading the page.

PHP Code:
<?
    $playlist 
file("http://67.189.104.92:82/playlist?request=playlist");

    for (
$i 1$i count($playlist); $i++) {
        
$songInfo explode("|!|"$playlist[$i]);
        
$title $songInfo[1];
        
$index $songInfo[2];
        echo 
"<a class='song' href='http://67.189.104.92:82/fsnowCrashSong?request=playlist&play=$index&Back=1&calloutput=1'style='margin-left: 10px;'>$title</a><br />";
    }
?>
__________________
Current Project

Last edited by Redline; 06-01-2006 at 05:57 PM. Reason: added source code
Redline is offline   Reply With Quote