Skip to content

Instantly share code, notes, and snippets.

View forethoughtde's full-sized avatar
🎯
Focusing

forethoughtde

🎯
Focusing
  • Munich, Germany
View GitHub Profile
@forethoughtde
forethoughtde / parseHTML.php
Created March 29, 2016 16:46
Programs which reads the HTML file, chunks by tags, write them to file and create JSON file which contains chapter heading.
<?php
class parseHTML
{
//counter appended to chunked file names
protected $counter = 0;
//Store book information such as book name, chapter names, version
protected $bookInfo;
//Holds filename with no extension
protected $fileName;
@forethoughtde
forethoughtde / OpenXML.php
Created February 25, 2016 07:23
XML Parser
<?php
require('XML.php');
class OpenXML extends XML
{
var $fileHandler;
public function openXMLFile($filename, $mode='r'){
$this->fileHandler = @fopen($filename, $mode);
}