•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 373,577 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,859 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
•
•
•
•
•
•
•
•
Hello,
this code snippet is a function used to manage an unlimited amount of hit counters with a text file.
It is crucial that each page will only be displayed once.
The text file syntax:
page_name.php:0
page_name.php:0
An example of a text file that was just set-up (not used by code, yet): (View Snippet)
This class will allow you to take an RSS feed (local or remote) and "export" it to an easily managed/viewed array. Below is an example of it usage:
<?php
include("exportrss.php");
// Parse XML/RSS 2.0 feed
$feed = new ExportRSS("test.xml", "2.0");
$channel = $feed->get_channel_data();
echo... (View Snippet)
Okay so I had this need to vary the template layout of an osCommerce theme using its BTS (basic template system) and noticed that unlike standard osCommerce where you can edit each and every individual page to have a unique layout, BTS uses a template system to generate its look. I've ran into... (View Snippet)
this code will delete all the files from a directory on the server. be careful when using this as it will delete everything in the directory so use it wisely or make sure you have backups if it is implemented on the wrong directory.
it works by searching for all the file which have a full stop... (View Snippet)
While doing a redesign of two sites I had this need to take my clients TemplateMonster template and show flash on ONLY the front page and a static image on the internal pages but the problem was that it ran on a template engine which used a single load header type setup not to different from a... (View Snippet)
This class allows for the handling of normal and serialized cookies as well as switching between these types of cookies.
Cookie Functions:
Write Cookies
Read Cookies
Delete Cookies
Use of this class is fairly simple.
Step 1: Include the class source in your php project using the require or... (View Snippet)
This is a recursive function I made to draw purely CSS bar graphs. You pass it an array of data and the total amount, example:
$someData = array('Oranges'=>4, 'Apples'=>10);
$total = 14;
echo drawCSSGraph($someData, $total);
Also, you can pass it options in the form of an array or as space... (View Snippet)
Just copy and paste the snippet into a file and save.
You need to save this under the web root, not in a web accessible folder. For example, on linux you could save it in your home directory. Say your user is "joe" then save it in /home/joe/ . Ify saved the file as interactive.php then you would... (View Snippet)
This code will display images within an email from the server. It will display an image with a choice of file extension which can be expanded to fit your needs.
this code was originally developed for a emailing system where the images to be displayed where uploaded by the user. (View Snippet)
FPDF is a class that provides a useful way to deal with PDF documents using dynamic content. Sometimes, according to a special circumstance, also would be valuable to send directly the PDF as attachment e.g. send an invoice automatically after processing a payment.
In this example we use a html... (View Snippet)