Jump to content

robindean

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by robindean

  1. Does this mean that the file would download once (upon first visit) and then all new query strings would be loaded from the cached file? i.e. I'm using things like: pagetitle.php?display=1thing vs. pagetitle.php?display=anotherthing would differences in the ? string force the viewer to download the entire 40k file again or would it load from cache?
  2. I'm using one large php doc to store my entire line of content. It's only 40k total, but I'd like to cache the entire file for faster serving regardless. The way my site loads, it queries the ? string at the end of a url and prints based on the result. I'd like to cache the ENTIRE file so that when people surf, it feels "instantanious". Methods? Suggestions?
  3. Thanks to both of you! I managed to get it working : )
  4. Here's what I'm attempting to do. I'm only one step away from having it operate successfully. a) Person enters my site and has an older version of flash player (let's say v6). b) No matter what, the first page to load is simply "webcast.php" c) Let's assume that "webcast.php" checks a server connection (see code for details) and discovers that the server is offline. No problem ... it prints html code with an embedded flash document which reflects this result. d) The flash document loads and detects whether or not the user has flash player version 8. When it notices that the viewer is using v6, it redirects the browser back to webcast.php ... but with a tag on the end (webcast.php?upgrade) e) The php code in the "webcast.php" document detects that it is titled "webcast.php?upgrade" and therefore displays different html code instead of the embedded flash document. ... deep breath ... I'm close, but not there. I know how to do this with javascript but php is new to me. For some reason it ignores my concept of using "else" and embedds everything or ... er ... something. Can I coax one of you to give me a tip on this? A solution? Here's my code thus far. <?php error_reporting(E_ERROR); ob_start(); $server = "robindean.no-ip.info"; $port = "80"; $churl = fsockopen($server, $port, $errno, $errstr, 3); $location = $_GET['location']; if($location=="webcast.php?blank") { print('blank page'); } else if($location=="webcast.php?upgrade") { print('upgrade page'); } else if (!$churl) { print('embedded flash server off page'); } else { print('embedded flash server on page'); } ob_end_flush(); return; ?>
  5. I'm getting close, so I'm going to start a new thread. Thanks for pointing me in the right direction.
  6. Just for safe posting, I'm trying to differentiate between "somesite.com" and "somesite.com?complimentary_tag" My intention is that, if the url location is "somesite.com" it prints one line of code but if it ends with "?complimentary_tag" on the end it prints a completely different line of code. Further more, In javascript, there's a difference between: somesite.com ... and ... [a href=\"http://somesite.com\" target=\"_blank\"]http://somesite.com[/a] ... and ... [a href=\"http://www.somesite.com\" target=\"_blank\"]http://www.somesite.com[/a] so I'm wondering how to use the "or" statement in php ... or do I even need to?
  7. How do I make use of this? I'm a newbie to php. I'm assuming thus far that I can say something to the effect of ... $mypage = $_SERVER['REQUEST_URI'] if $mypage = "page_name.html?extension" { print('this is written to the page') }
  8. I have a javascript which I need to convert into php code. It does something to the effect of this ... <script language="javascript"> var mypage=window.location.href if (mypage=="page_name.html?extension") { do somthing here; } else do another thing; </script> Basically, It's asking for a page name and then deciding what to do based on the result. The code is going to be placed within the same page that it is actively attemping to identify, which is why I'll be adding ?extension to the end. Is there a simple php version of this action? Thanks in advance.
×
×
  • 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.