|
|
||
PhpCodes et fonctions récentsNuage de Tags
En utilisant des tables temporaires en Mysql, on applique un calcul simple et on utilise CSS afin de rendre un nuage de tags tels qu'utilisé dans les moteurs de recherches récents. Catégorie datamining Compresser un fichier avec exec
Ce script permet de compresser fichier lui même créé en utilisant la fonction exec et une compression en tar.gz. Catégorie fichiers Générer un fichier excel
Ce script utilise les headers 'Content-type' pour télécharger un fichier xls générer par Php en formatant des données de manière très simple. Catégorie datamining
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
|
|
Catégories |