Articles in: Scripts

Home » Archive » Scripts

Javascript & PHP Star Rating Script

I’ve searched around the interwebs for an ajax star rater and I came across a few different possibilities, all of which looked very good. The top result from google was Nick Stakenburg’s “Starbox” for “ajax star rater”. I also found Masuga Web Design’s Ajax Star Rater and a script from MySandbox to be popular results. However I couldn’t really seem …

Gaming Website Script

Want to run a gaming website full of screenshots, videos, reviews, downloads and everything else on the games you wish to run? Easily upload and manage all data for the games you include on your website through the admin panel and control the entire site. The BFGamerz Gaming Script comes with vBulletin announcement thread viewer custom installed so you can …

PHP Prime Number Script

Here is a simple little script that will determine if a number is prime or not. Just submit the function through with the parameter number as the integer you want to determine – is prime or not.
Syntax

is_prime(number);

Here is the function’s definition:

function is_prime($num=0)
{

$num = (int)$num; // Make sure it's an integer.
if($num > 0)
{
$count = 0;
$half = round($num / 2);

for($i=2;$i<=$half;$i++)
// Check the …

PHP Upload and Resize Image

Many times when you upload a image somewhere you want to resize it to different dimensions based off of a maximum width or height. Here is a simple script that does this for you, using a HTML form and a PHP script. We start with the PHP script that will run if our $_GET['do'] is set to “upload.” Then we …

PHP Favicon Generator Script

I decided to make a free easy to use favicon generating script that uses PHP. The script has a few features and requirements when uploading your image to be converted to a favicon. First the script checks for a few things such as file type, file size, if the directory is writable, and the specified dimensions. You can create a …

CSS Drop-Down Menu

Drop down menus are very useful for navigation on websites and for holding many links to pages on your site without taking up much space on your web pages. Using just CSS and Javascript we can make a nice simple drop down menu you can put on your web page. To do this we’ll have three files: dropdown.css, dropdown.js, and …

PHP Create Thumbnail Images

Here we are going to observe how to use PHP to generate thumbnails for us. A thumbnail is a smaller size and usually smaller quality of an image shown as preview or link to the original image. Thumbnails can be very useful for faster loading times and quicker display of images on your web pages and a few other reasons. …

Javascript Snowing Effect Script

Here is a nice feature to add to your web pages during the holiday season. Falling snowflakes are very simple and yet a great eye catcher to new visitors to your website.
Here is the snowflake gif I made for this:

Now, to make  the effect of the snowflake falling on the webpage we will just use javascript. You want to place …

Simple File Hosting Script

I’ve made an easy to use file hosting script that is free for download.
It has some nice features such as:

Allowed file extensions.
File size limit.
Generated file names.
BBcode, IMG code, Url, etc.
Terms of Conditions

Generated file names on the server are created using the functions rand() and the md5() hash generator. Here is the code:

<?php
$ext = end(explode(".",strtolower(basename($_FILES["file"]["name"]))));
$rand = rand(1000,9999);
$filename = strtolower(basename($_FILES["file"]["name"]));
$filename = md5($rand.$filename);
$md5_name …

PHP Cookies with Login – setcookie()

A cookie is a small file that the server embeds on the user’s computer. This data is sent and recieved with each browser that is used to view a page using cookies.
To create a cookie in PHP use the setcookie() function. Here is its syntax:

setcookie($name, $value, $expire, $path, $domain);

So if you want to create a cookie for someone’s status that …

Sponsors