LinksTraffic - Links and traffic exchange system

Php code snippets

english directory french directory
Search: Advanced Search

Index Webmaster | Tutorials | Web Scripts

Php code snippets

Browse by category
seo & Php SEO(new) data Data Mining(new) image 3d Graphism(new) networking Network(new)
user management User Management(new) file management File I/O(new) xml rss XML/RSS(new)

Latest Scripts & Functions

Tags cloud
Using temporary tables and a small mathematic calculation, we display a tag cloud. CSS covers the design of the elements.
datamining category
Tar gz a file using the exec function
This online script creates a file using the exec command and compress the same file using the tar.gz extension. The result string is also displayed.
files category
Generating an excel file
This script uses the content-type headers to launch a Microsoft excel sheet containing numbers formatted with tab in Php.
datamining category
Random display of embed videos
This function retrieves the source code of an embed video randomly from an array of several videos. It simply uses the array_rand() function of Php.
Datamining category
Dealing with content of a posted message
From an online form we interpret the content of a message by extracting tags and including the result inside a temporary mysql table. We then retrieve and display the html result on a page.
Datamining category
Simple XML parser
This script parses elements from a remote XML file. The xml file is encoded in ISO and elements are extracted and structured inside a table in UTF-8. The design can be adapted to the needs and the script adpated to different xml dataset.
XML category
Watermarking an Image
Using the GD library, we affix a watermark (gif image) in the middle of an original image. It can be used to protect an image from being copied.
Graphism category
Cropping an Image
Using the GD library, this script takes a jpg image and crops it to give a square. This is often used to make thumbs.
Graphism category
Post Data via Socket
This script shows you a way to connect to a server via a remote place using the fsockopen function of Php. The example posts some data throught a socket and retrieve the resulting page along with headers.
Network category
Resizing an Image
Using the GD library, this script takes a jpg image and resizes it to match a smaller image having a maximum of 640 pixels on the height and width.
Graphism category
Rename files inside a directory
From a given path, this code provides a way to list all files and rename each one while extracting unwanted files. It uses serveral Php File I/O functions such as rename, is_dir...
File I/O category
Description, title and keywords of a page
Using the Curl library, the script reads the content from a web page and if it does not find the meta tags, it extracts some information to finally obtain a title, a description and few keywords about the page. The script also uses the iconv function to take care of the different charset.
Data Mining category
Reading & Updating a File
This script reads a file line by line using the fgets function and updates the file by either adding a line or updating a field contained on a line.
File I/O category
Url Encoder
This simple example uses the urlencode and urldecode functions of Php. It takes an Url and encodes so it can be sent over http as a variable. It then decodes it to take back the Url to its original form.
Data Mining category
Preg_match examples
The preg_match function of php is a very handy tool for string manipulation and data mining. The source code provided shows some good examples of use.
Data Mining category
Reading from a file and Outputting in a String
This script reads the content of a file and outputs its content into a string. It uses the file_get_contents() function which opens, reads and closes the file automatically.
File I/O category
Write to a file
This script writes to a file the html content you entered from an online form. It uses the fopen and fwrite functions of Php.
File I/O category
Setting cookies from a login form
This online tool can set cookies from values sent by an online form. It uses the setcookie function. It also retrieve the data stored inside the cookies for 10 minutes.
User Management category
Google Sitemap Generator
This script generates the sitemap from an Url. It uses the CURL library and the preg_match Php function. This sitemap is generated in xml and it's used by Google as a way to analyse the structure of a website.
SEO (Search Engine Optimization) category
Html Encoder
This script retrieves the html formatted text from an online form and encodes the html tags. It's commonly used to save html text inside databases.
Data Mining category
Whois Server Query
This online tool can query any whois server given the domain name and return the results. It uses the fsockopen function of Php.
Network category
Meta Tags Retriever
This online tool can retrieve meta tags from a given Url using an Html form and the Curl library.
SEO (Search Engine Optimization) category

Webmaster Corner

The Millionaire league
Dozens of Easy and Automatic Ways to Make Money Online Everyday!

Niche Annihilation Method
Crush Your Competition!
Download the method Now

iPowerWeb
Incredible Membership Packages - Web Hosting!

One Month Free Trial! ProStores - an eBay Company
Gain customers, increase sales, and boost profits with your own Web Store.

Get Google Pay-Per-Click Ads Free!
Automated Cash Formula $$$

Categories

Copyright 2004-2008 @ LinksTraffic RHM Solution ::: Partners | Privacy | Contact us form