LinksTraffic - Links and traffic exchange system

Php code snippets

english directory french directory
Search: Advanced Search

Php code snippets

php by category
php code snippets Index phpNetwork Php Scripts & Functions Network Php Scripts & FunctionsPhp - Search Engine Optimization Php - Search Engine OptimizationData Mining Php programming Data Mining Php programming
Graphic programming in Php Graphic programming in PhpFile I/O File I/OXML / RSS / Atom in Php XML / RSS / Atom in PhpPhp - User Management (Cookies, Sessions...) Php - User Management (Cookies, Sessions...)

php Scripts & Functions

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
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
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 Php programming 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 Php programming 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
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 Php programming 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
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.
Graphic programming in Php 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 Php Scripts & Functions 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.
Graphic programming in Php 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.
Graphic programming in Php 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 / RSS / Atom in Php 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.
Data Mining Php programming 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.
Data Mining Php programming 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.
Data Mining Php programming 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.
File I/O category
Tags cloud
Using temporary tables and a small mathematic calculation, we display a tag cloud. CSS covers the design of the elements.
Data Mining Php programming 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.
Php - Search Engine Optimization 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.
Php - User Management (Cookies, Sessions...) category
Meta Tags Retriever
This online tool can retrieve meta tags from a given Url using an Html form and the Curl library.
Php - Search Engine Optimization category

Webmaster Corner

The ClickBnk Code
Another Killer Product From Michael Jones, simply follow the Blueprint For Easy Online Wealth Using Click Bank...

Twitter Traffic Machine
The Automated Growth & Money Making System from growing A Twitter Account Rapidly W/total Automation Via 5 Videos!

iPowerWeb
Incredible Membership Packages - Web Hosting!

Maverick Money Makers - Get Paid For Life!

Categories

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