You are here: Home
Search
Search Only:

Search Keyword script

Total: 21 results found.

Page 1 of 2
Here's a little PHP command line script to do Apache Log Rotation on your web server. This script uses zip to compress the files and retains the logs for 10 days before deletion. <?php date_default_timezone_set('America/New_York'); ...
Creating a recordset and displaying data from a PostgreSQL table using PHP; Making the connection: $DB_HOST="hostname"; $DB_NAME="databasename"; $DB_USER="username"; $DB_PASSWORD="password"; $psql="Select ...
3. PHP CLI: Rsync Script
(Tech Notes/Linux)
Here's a handy script to run rsync from the command-line that prompts for source and destination paths; #! /usr/bin/php <?php ## Control CLI parameters if (($argv[1]=="") OR ($argv[2]=="")) ...
Administrators are often called upon to write scripts to accomplish tasks. I've been playing a lot with php cli scripting lately and had a need to create a script to startup a VirtualBox VM from the command ...
5. Ubuntu: Change Hostname
(Tech Notes/Linux)
... the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh /etc/hostname server So on a Debian based system we can edit the ...
6. DDoS Defences
(Tech Notes/Linux)
... rules. Typically netfilter firewall example scripts have a default of DROP (this is done at the end of the rule chain): your list of rules decides what is accepted. The implications are obvious: bad packets ...
... I never thought I'd find a legitmate reason to create a "file scrounger". Throughout development I've been executing the script from the command line to test and debug. Happily building the app step ...
8. Javascript: Cookies
(Development/Javascript)
Web development, sooner or later, requires dealing with cookies. I've found using Javascript to handle cookies preferable over using php. Reason; "Header already sent" errors.  Generally reading a cookie ...
... $time=time()+3600; //create-reset the cookie setcookie("sessid",$sid, $time,"/"); setcookie("sessname",$sname, $time,"/"); ?> Note: Creating cookies with PHP is problematic. See http://microswamp.com/development/java/117-javascript-cookies ...
... I found RPL very handy when executed in a shell script to replace hugh strings on multiple lines with many escape characters. My immediate need was to remove text from 200+ files in multiple subdirectories ...
I found this at Bit Repository. Decided to add it here for posterity. Function: function calculate_word_popularity($string, $min_word_char = 1, $exclude_words = array()) $words_array = str_word_count($new_string, ...
12. Speed Test: Drupal versus Joomla!
(Tech Notes/General)
... changes were made. About the Tests; A custom perl script was written to test the time required to download the index page for each site. Each HTTPResp test was run 3 consecutive times to provide an average. ...
13. PERL: Test HTTP Response
(Development/General)
I'm not exceedingly fond of perl scripting, but this one is useful for testing the time it takes to download a web page from a site. As there is no cache system employed it provides a raw time to download ...
14. Force File Download
(Development/PHP)
... a little dicey. The user's browser settings can get in the way, opening the image in another browser window or a local image viewer. Hence the need to create a script to provide a clean download mechanism. ...
15. Javascript: Simple Message Box
(Development/Javascript)
I'm always looking for the easy way to implement code. Here's a real easy way to produce a message box on a web page; <script type="text/javascript"> alert("your message here") </script> ...
16. Javascript: Return to Previous Page
(Development/Javascript)
Really simple code to return a user to the previous page in a browser. There are multiple ways of implementing the code; 1) In-line; <script type="text/javascript"> history.back() </script> ...
I needed a captcha type thing for a website I was building. So off to the 'net I went to research available scripts. Everything I read, that appeared objective, indicated that captcha is a weak way to ...
18. php.net
(Web Links / Developer)
THE server-side scripting language that drives the Internet. Also, the language that Joomla! is developed with.  ...
19. MicroSwamp
(Category)
Researching information on the internet, hand coding, program/script hacking, implementation and testing takes considerable time. Making it more complex, search results change over time, sites come and ...
20. Javascript
(Category)
<< Start < Prev 1 2 Next > End >>