Jump to content

calvin182

Members
  • Posts

    190
  • Joined

  • Last visited

Posts posted by calvin182

  1. So I have a program that I am going to give out on my site, but I know like a handfull of users are going to actually go back to my site to check for an upgrade, so I want to create a notification in the backend to say if its up to date or if a newer version is available.what would be the best method to accomplish this?

  2. well i assume you arent interested in using a databse to store all of this, so maybe it would be better if you had a news.php file and in there is all of your news in variables like$news01 = "blah blah html blah blah news bold one";$news02 = "blah blah html blah blah news bold two";$news03 = "blah blah html blah blah news bold three";i dont think you start variables off with a number either.but what i would do is make a form on my server that i type my news entry in html format into and when i submit it, it till convert the html characters and it will append to the news file. then when i want to load it i would have to do the html entities decode whatever function....just an idea tho, but i would also password protect the page too.

  3. I am looking to expand my photo gallery program to add video but I don't really know if there are any PHP video functions. Does anybody know, because if there are, I'd like to take the length of the video, divide it by three, and capture three frames and create an animated gif of them as a video preview. If PHP cannot do this but you know something else might be able to, please let me know.

  4. What I'm looking to do is check a file from my site for a specific varible containing current version info for a script i wrote. If the file can be reached yippie, but if it cannot i dont want some uguly error craping up the place, i'd like a nice 'server cannot be reached at the moment' message or something like it. The file to be reached is just a simple .txt or .php text file only containing the variable... any thoughts on how to do this anyone?

  5. i did something like this but I instead of outputting xml in a php file i outputted a php array to a new file. here's what I used, it may help you to create the function you need:

    $f=fopen("db.php","w");     fwrite($f, str_replace("$", "$", "<?php ".$output."?>"));     fclose($f);

    I doubt you'll need the st_rreplace in there but if you have any special characters that mess up the script like the $ it may be usefull. if the file does not exist, it wil attempt to create it, assuming you have your directory's permissions set so a new file can be created.hope this helps, i didnt go through those other links so if its the same im sorry... im just too lazy haha

  6. So when u determine its a bot, what do you have added to the page exactly and does it actually help your page rank? I'd be interested in giving this a try but I don't know what to insert into my page if it were a bot, a table of links at the bottom of every page or would that be a dumb thing to do because of caching?

  7. here's what I got:

    <form enctype="multipart/form-data" action="upload.php" method="POST" onsubmit="return checkExt(this.userfile.value)><script type="text/javascript">function checkExt(s){if (!s) return false;var OK = false;var accept = new Array("jpg", "jpeg", "png");;var tmp = s.split('.');if (!tmp[1]) OK = falseelse if (accept.indexOf(tmp[1].toLowerCase()) > -1) OK = true;if (!OK) alert('Accepted files are: ' + accept);return OK;}</script>

       <input type="hidden" name="MAX_FILE_SIZE" value="2097152" />   <input name="uploaddirectory" type="hidden" value="<?php echo "$path"; ?>" size="50"/>   <input name="userfile" type="file" size="50"/><br/>   <input type="submit" value="Add to gallery" /></form>

×
×
  • Create New...