Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------Extract_helper.php-----------
- <?php
- /////Created by @anu
- ////For edgeryders
- $file = file_get_contents('Content.txt');
- $url = 'ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/ibiblio/gutenberg/';
- preg_match_all('/[\d]{4,5}/', $file, $matches);
- $include_slash = preg_replace('/(\d)/', '${1}/', $matches[0]);
- for ($i=0; $i < count($include_slash); $i++) {
- $urls[$i] = $url . substr($include_slash[$i], 0, -2). $matches[0][$i];
- }
- foreach ($urls as $key => $url) {
- echo '<a href="Format_content.php?url=' . $url . '/' . $matches[0][$key] . (strlen($matches[0][$key]) == 5 ? '-8' : '') . '.txt&project_code=' . $matches[0][$key] . '" target="_blanl">' . $url . '</a><br>';
- }
- ?>
- ---------Format_content.php-------
- <?php
- error_reporting(0);
- $get_content = file_get_contents($_GET['url'], 0, NULL, 0, 1500);
- preg_match('/Title: (.*)/', $get_content, $title);
- preg_match('/Release Date: (.*)/', $get_content, $release_date);
- echo '[' . trim($title[1]) . '](<a href="' . $_GET['url'] . '" target="_blank">' . $_GET['url'] . '</a>) ' . $release_date[1] . '. Project Gutenberg text no. ' . $_GET['project_code'];
- if(!isset($title[1])) {
- echo '<h3>Errors?</h3>';
- if (!isset($_GET['error'])) {
- echo '<a href="?url=' . substr($_GET['url'], 0, -6) . '.txt&project_code=' . $_GET['project_code'] . '&error=1">Try method 1</a>';
- } elseif ($_GET['error'] == '1') {
- echo '<a href="?url=' . substr($_GET['url'], 0, -4) . '-0.txt&project_code=' . $_GET['project_code'] . '">Try next method 2</a>';
- } else {
- echo 'Please follow the native url from previous tab and find the solution manually';
- }
- }
- ?>
- -----------Cotent.txt------------
- Three Acres and Liberty. 1918. Project Gutenbert text #4509. Instructions for "living off the land" with a small farm in the U.S..
- The Farm That Won't Wear Out. Project Gutenbert text #4525. Instructions for nutrient management in farm soils.
- Dry-Farming: A System of Agriculture for Countries under Low Rainfall. 1920. Project Gutenbert text #4924.
- Farmers of Forty Centuries, or: Permanent Agriculture in China, Korea and Japan. 1911. Project Gutenbert text #5350.
- Home Vegetable Gardening: A Complete And Practical Guide To The Planting And Care Of All Vegetables, Fruits And Berries Worth Growing For Home Use. Project Gutenberg text #7123.
- The Country Housewife and Lady's Director In the Management of a House, and the Delights and Profits of a Farm. Project Gutenberg text #7123. Mostly a recipe book, but with some great food processing etc. tips. [TODO: There is a second part. To be found.]
- Common Diseases of Farm Animals. 1915. Project Gutenberg text #8502. Seems to be quite in-depth. Obviously, more modern material would be better.
- Domestic Cookery, Useful Receipts, and Hints to Young Housekeepers. Project Gutenberg text #9101. Mostly recipes, but among them some great stuff ("Pickled walnuts will keep for six or seven years").
- Manual of Gardening: A Practical Guide to the Making of Home Grounds and the Growing of Flowers, Fruits, and Vegetables for Home Use. 1910. Project Gutenberg text #9550.
- Directions for Cookery, in its Various Branches. 1840. Project Gutenberg text #9624.
- Woman's Institute Library of Cookery, Volume 1: Essentials of Cookery; Cereals; Bread; Hot Breads. Project Gutenberg text #9935.
- Woman's Institute Library of Cookery, Volume 2: Milk, Butter and Cheese; Eggs; Vegetables. Project Gutenberg text #9936.
- Woman's Institute Library of Cookery, Volume 3: Soup; Meat; Poultry and Game; Fish and Shell Fish. Project Gutenberg text #9937.
- Woman's Institute Library of Cookery, Volume 4: Salads and Sandwiches; Cold and Frozen Desserts; Cakes, Cookies and Puddings; Pastries and Pies. Project Gutenberg text #9938.
- Woman's Institute Library of Cookery, Volume 5: Fruit and Fruit Desserts; Canning and Drying; Jelly Making, Preserving and Pickling; Confections; Beverages; The Planning of Meals. Project Gutenberg text #9939.
- English Housewifery Exemplified In above Four Hundred and Fifty Receipts Giving Directions for most Parts of Cookery. 1764. Project Gutenberg text #10072.
- Reform Cookery Book: Up-To-Date Health Cookery for the Twentieth Century. Project Gutenberg text #11067.
- Our Farm of Four Acres and the Money we Made by it. 1860. Project Gutenberg text #11555.
- Science in the Kitchen. 1893. Project Gutenberg text #12238.
- Old Cookery Books and Ancient Cuisine. 1902. Project Gutenberg text #12293.
- Project Gutenberg text #12815.
- Project Gutenberg text #13347.
- Project Gutenberg text #13510.
- Project Gutenberg text #13537.
- Project Gutenberg text #13545.
- Project Gutenberg text #13887.
- Project Gutenberg text #13923.
- Project Gutenberg text #14594.
- Project Gutenberg text #16232.
- Project Gutenberg text #16900.
- Project Gutenberg text #18050.
- Project Gutenberg text #19775.
- Project Gutenberg text #19998.
- Project Gutenberg text #20770.
- Project Gutenberg text #21682.
- Project Gutenberg text #21724.
- Project Gutenberg text #22114.
- . Project Gutenberg text #22484.
- Project Gutenberg text #22790.
- Project Gutenberg text #22829.
- Project Gutenberg text #23435.
- Project Gutenberg text #24076.
- Project Gutenberg text #26132.
- . Project Gutenberg text #26313.
- Project Gutenberg text #26374.
- Project Gutenberg text #26718.
- Project Gutenberg text #26801.
- Project Gutenberg text #27257.
- Project Gutenberg text #28452.
- Project Gutenberg text #28500.
- Project Gutenberg text #29058.
- Project Gutenberg text #29084.
- Project Gutenberg text #30441.
- Project Gutenberg text #30983.
- Project Gutenberg text #31105.
- Project Gutenberg text #31423.
- Project Gutenberg text #31605.
- Project Gutenberg text #31643.
- Project Gutenberg text #31729.
- Project Gutenberg text #32158.
- Project Gutenberg text #32818.
- Project Gutenberg text #33830.
- Project Gutenberg text #33974.
- Project Gutenberg text #34175.
- Project Gutenberg text #34437.
- Project Gutenberg text #35567.
- Project Gutenberg text #35646.
- Project Gutenberg text #36064.
- Project Gutenberg text #36689.
- Project Gutenberg text #37389.
- Project Gutenberg text #38615.
- Project Gutenberg text #39791.
- Project Gutenberg text #39869.
- Project Gutenberg text #40190.
- Project Gutenberg text #40943.
- . Project Gutenberg text #41352.
- Project Gutenberg text #41406.
- Project Gutenberg text #42544.
- Project Gutenberg text #42718.
- Project Gutenberg text #42955.
- Project Gutenberg text #43177.
- Project Gutenberg text #43468.
- Project Gutenberg text #43531.
- Project Gutenberg text #43867.
- Project Gutenberg text #43867.
- Project Gutenberg text #44603.
- Project Gutenberg text #44732.
- Project Gutenberg text #44750.
- Project Gutenberg text #44766.
- Project Gutenberg text #45004.
- Project Gutenberg text #45083.
- Project Gutenberg text #45154.
- Project Gutenberg text #45331.
- Project Gutenberg text #45703.
- Project Gutenberg text #46052.
- Project Gutenberg text #46144.
- Project Gutenberg text #46377.
- Project Gutenberg text #46445.
- Project Gutenberg text #47444.
- Project Gutenberg text #48134.
- Project Gutenberg text #48360.
- Project Gutenberg text #48378.
- Project Gutenberg text #48546.
- Project Gutenberg text #48547.
- Project Gutenberg text #48722.
- Project Gutenberg text #48753.
- Project Gutenberg text #49155.
- Project Gutenberg text #50079.
- Project Gutenberg text #50191.
- Project Gutenberg text #52551.
- Project Gutenberg text #53458.
- Project Gutenberg text #53525.
- Project Gutenberg text #54138.
- Project Gutenberg text #55314.
- Project Gutenberg text #55555.
- Project Gutenberg text #55705.
- Project Gutenberg text #56585.
- Project Gutenberg text #57340.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement