Jump to content

heartburn

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

heartburn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That's great, I will try it in the morning.  Thanks for the reply.
  2. I have a few files that do the following: 1. This one generates an xml file based on the time. 2. This file should (in theory) access the first file and get the output of the first file. What is actually happening is that the second file is accessing the first file and spitting out all of the code that I have (for the first file). I know that most people would like to see code rather than just hear me talk so here we go: timeTest.php:[code]<?php error_reporting(0); //  This top area sets the current time, gets the date and names the xml doc $date = date("m/d/Y"); $fileDate = date("mdy"); $time = date("H:i:s"); $xmlFileName = "$fileDate.xml"; $default = "default.xml"; //  This next area will find and open the xml file if (file_exists($xmlFileName)){     $xml = simplexml_load_file($xmlFileName);     trim($xml);     countNow($xml, $time, $date);     } else { // if the file for today's date is not found, this file will play     $xmlFileName = $default;     $xml = simplexml_load_file($xmlFileName);     trim($xml);     countNow($xml, $time, $date); } //  This function counts the number of elements in the playlist //  when it has that number it moves onto timeNow function countNow($xml, $time, $date){     $totalThread=0;     foreach($xml->song as $num){         $totalThread++;     }     timeNow($time, $xml, $date, $totalThread); } //  This function will take the time and finds where to start in the playlist //  Once it has that it moves onto makeXML function timeNow($time, $xml, $date, $totalThread){     $threadNum = 0;     do{         $threadNum++;     }while($time>$xml->song[$threadNum]['fileTime']);     makeXML($time, $xml, $date, $totalThread, $threadNum); } //  This function will create an xml file for the playlist //  Once it writes the first few lines it goes to getList for the bulk of the playlist function makeXML($time, $xml, $date, $totalThread, $threadNum){     echo "THIS WOULD HOUSE THE XML HEADER BUT IT WAS SCREWING UP THE CODE TAGS IN THE FORUM";     echo "<playlist date=\"$date\">\n";     echo "<song fileDate=\"$date\" fileTime=\"$time\" fileTitle=\"e360live.com Legal ID\" fileArtist=\"e360live.com\" fileSource=\"400000.flv\" nonmusic=\"Y\" fileLabel=\"\" />\n";     getList($time, $xml, $date, $totalThread, $threadNum);     echo "</playlist>"; } //  This function populates the xml list with data from the called xml file //  Once it is done, it goes back to makeXML for the closing of the xml file function getList($time, $xml, $date, $totalThread, $threadNum){     // This part checks to see if the first file is the 400000.flv, if so it skips it     if($xml->song[$threadNum]['fileSource']=='400000.flv'){         $threadNum++;     }     do{     echo "<song fileDate=\"$date\" fileTime=\"".$xml->song[$threadNum]['fileTime']."\" fileTitle=\"".$xml->song[$threadNum]['fileTitle']."\" fileArtist=\"".$xml->song[$threadNum]['fileArtist']."\" fileSource=\"".$xml->song[$threadNum]['fileSource']."\" nonmusic=\"".$xml->song[$threadNum]['nonmusic']."\" fileLabel=\"".$xml->song[$threadNum]['fileLabel']."\" />\n";     $threadNum++;     }while($threadNum<$totalThread); } ?>[/code] index.php[code]<?php error_reporting(0); $info = file_get_contents("timeTest.php"); $ctype="application/octet-stream"; // disable HTML page caching on the PHP session level session_cache_limiter("nocache"); header("Expires: 0"); // HTTP/1.1 // disable browser and proxy cache header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Content-Type: $ctype"); header("Pragma: "); echo $info; ?>[/code] Alright, so you see the code, but when I run the second one (index.php) instead of printing the output of the file I get the code from timeTest.php (the first file). I take it that I am using the wrong function (file_get_contents)...  is there a way to get the xml output instead?
  3. hmmm... it's possible.  Thanks for your ideas.
  4. well, I thought am wondering if there was a way to basically load the source page into memory and then basically re-write it back into the iframe?  Does that make sense? I know that before this post it wasn't really a php question, more of a js one, but I frequent this forum and figured that someone might have run into this before as well.
  5. Is it possible to force a source file for an iframe to use your css? As in, can I link an iframe to a sister-site and then use my own css to control the layout?
  6. I am wondering if there is a way to allow more than two simultaneous downloads from my webserver (apache). The reason is that I have a flash player that is constantly caching the next thing to be played so there is a possibility that when you log onto the page you not only have to download the data and pictures from the page, but you also have to download the data from flash. I have made it so that it waits about eight seconds before the flash player starts to download stuff, this creates enough time for the rest of the page to cache, but once the player starts they are stuck waiting until one of the feeds is done so they can't navigate to other information while they wait. I am sure that there has to be a way to fix this, but I just don't know how. I saw a post that is a few below mine that uses the header info, but I don't think that pertains to my problem, does it?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.