PHP code to Scrape tags from an HTML page
Following code uses DOM to extract links. This code scrapes image and anchor links. This code can be extended to include other html tags.
Simply Explaining Technology
Following code uses DOM to extract links. This code scrapes image and anchor links. This code can be extended to include other html tags.
A sentence can be parsed in many different ways in PHP. A few methods are presented here along with their analysis. Regardless of the language you use for parsing a…
JavaScript Object Notation (JSON) is a lightweight standard for data interchange. It offers several advantages over XML for data interchange such as it can be used for serializing and transmitting…
Epoch time is Unix timestamp which counts the number of seconds since January 1 1970 00:00:00 UTC. Without getting into long discussion, follow is how your convert between human readable…
Validating email is more difficult than one might think. Recently I found this this code at PHP.net and I feel a need to republish this to emphasize its effectiveness and…
Passing arrays by value and reference The difference between passing by value and passing by reference is that you when pass by value, you are passing a copy of the…
The usort function sorts an array by values where the values are sorted by a user-defined function. usort has the following syntax The comparison function takes two arguments and it…
The is_dir() function in PHP allows users to check whether a file is a directory. It returns true if the file is a directory. However, the addresses provided must be…
The crypt() function provide one-way encryption. Using one-way encryption is like using a key to lock and unlock something. The key is your password. To encrypt: To decrypt: