Jump to content

chrziz

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chrziz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I just noticed that after I checked the debugging outputs and actually ran the script. I will research these techniques you've showed me and learn how to implement them in all my future scripts. You've been very knowledgeable on this topic. Thanks for all the help!
  2. I modified the script with your changes, it works perfectly and faster. Nice job!
  3. Thanks a lot for the input! Is the reason for adding the if conditions to prevent errors?
  4. I've been coding simple PHP scripts for a few years now but I know my coding techniques probably aren't the most effective as I am all self-taught. I wrote this simple script to get input from a text field, search if the first word is a hard coded "command", then search the respective provider defined by the "command" with the text following the command. The script is short and pretty self explanatory. Can anyone offer any constructive criticism as making the script more effective thus faster (as far a script loading time)? Any things I'm doing right, wrong, etc. Any tips would be highly appreciated so I can write better quality scripts in the future. Thanks! http://rafb.net/p/bynfAk93.html
  5. Thanks for that, but I've looked that website over 50 times and haven't found out how to turn the caching off. The caching works properly, but I just cant disable it for certain scripts that need updated feed data.
  6. I am using [a href=\"http://magpierss.sourceforge.net/\" target=\"_blank\"]Magpie RSS[/a] to read an rss feed and by default it uses a feed caching system that so it only grabs the feed once an hour (or whatever time you specifty). It also has a constant that you can define to disable caching: [code] * CONSTANTS - redefine these in your script to change the * behaviour of fetch_rss() currently, most options effect the cache * * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects? * For me a built in cache was essential to creating a "PHP-like" * feel to Magpie, see rss_cache.inc for rationale [/code] Here's the [a href=\"http://chrziz.com/rss_cache.txt\" target=\"_blank\"]rss_cache.inc[/a] it says to refer to. I am fairly new to php and I am trying to turn the caching off, but just for a specified script so it grabs new info every time the script is executed and not pull the cached old data. This is what i was trying to do: [code] include_once('/rss/magrss/rss_fetch.inc'); define("MAGPIE_CACHE_ON", false); $rss = fetch_rss("http://gmail.google.com/gmail/feed/atom/"); foreach ($rss->items as $item ) {     $count++; } if ($count > 0) {     $message = "$count new messages"; } else {     $message = "No new messages."; } [/code] It doesn't work and just grabs the cached page, Can someone tell me what I'm doing wrong? Thank you Chris
  7. I am trying to figure out the best way create a categories system that can have unlimited sub categories with PHP and MySQL. I tried a few different methods but I cannot get any to work properly. So far what I have is a table with the following structure: categories -cat_ID -cat_name -parent_cat_ID I am trying to figure out how to create a loop that when given a cat_ID it keeps on grabbing the parent_cat_ID and cat_name until it gets to the top. Is this the best way of doing this or is there a simpler way?
×
×
  • 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.