Quantcast
Channel: Ruben Sargsyan » file
Browsing all 6 articles
Browse latest View live

Write rss to a file

This function is used for writing rss to a file. <?php function rss_to_file($url,$file){ $rss = simplexml_load_file($url);   if($rss){ $text = "";   $text .= $rss->channel->title."\r\n \r\n...

View Article



Tags of the file content

This function is used for leading out all tags with their counts from the file. <?php function tags_in_the_file($file){ if(file_exists($file)){ $content = file_get_contents($file, true);...

View Article

Search text in the directory files

An example for searching text (a word or phrase) in the directory files: <?php function search_text_in_directory_files($directory, $text){ if(file_exists($directory)){ $files = array();...

View Article

Move JavaScript codes from a file to an other file

An example to move the JavaScript codes from a file to an other file: <?php function moveJavascriptCodes($fromFile,$toFile){ $fileText = file_get_contents($fromFile);...

View Article

Sort all words and write into a file

A PHP example to sort all words of a text in alphabetical order and write the words into a file. <?php function sort_all_words_and_write_into_file($text,$file){...

View Article


Retrieve links and sort them by follow or nofollow

This PHP example is used to retrieve all links from a file content or a url content, then sort by the follow links or nofollow links and show them: <?php $file = "http://example.com";   $content =...

View Article
Browsing all 6 articles
Browse latest View live




Latest Images