PHP Classes

PHP URLs From Database: Find MySQL database table records to extract URLs

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 172 All time: 8,819 This week: 39Up
Version License PHP version Categories
php-urlsfromdb 1.0.0The PHP License5PHP 5, Databases, Searching
Description 

Author

This package can find MySQL database table records to extract URLs.

It can retrieve the tables of a MySQL database and extract the fields of type text.

The class can find the table records for text fields that may have URLs in them.

Innovation Award
PHP Programming Innovation award nominee
January 2018
Number 8
This package can find MySQL database table records to extract URLs.

It can retrieve the tables of a MySQL database and extract the fields of type text.

The class can find the table records for text fields that may have URLs in them.

Manuel Lemos
Picture of zinsou A.A.E.Moïse
  Performance   Level  
Name: zinsou A.A.E.Moïse <contact>
Classes: 50 packages by
Country: Benin Benin
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

Example

<?php
               
// ini_set("max_execution_time",9999);
               
set_time_limit(9999);
               
define("SERVERNAME","localhost");
               
define("USERNAME","root");
               
define("PASSWORD","");
                require_once(
'Urls_From_tables.class.php');
               
               
// $searchFromDatabase=array("sensei");
               
$object=new Urls_From_tables(
               
// $searchFromDatabase
               
); //Enter no parameter to search from the entire database
               
               
               
               
echo'<pre>';
                echo
'<h2>var_dump($object->OnlyUrls());</h2>'; var_dump($object->OnlyUrls());
                echo
'<h2>var_dump($object->get_just_urls());</h2>'; var_dump($object->get_just_urls());
                echo
'<h2>var_dump($object->get_justTrue_Exturls());</h2>'; var_dump($object->get_justTrue_Exturls());
                echo
'<h2>var_dump($object->get_nlinks());</h2>'; var_dump($object->get_nlinks());
               
// echo'<h2> var_dump($object->getBrokens()); for all urls and http status in array</h2>'; var_dump($object->getBrokens());
                // echo'<h2> var_dump($object->getBrokens(true)); for array of just brokens(probably) links</h2>'; var_dump($object->getBrokens(true));
               
echo'</pre>';


Details

This package is a manner to answer a request posted in the PHPCLASSES SPECIALISTS FORUM. The purpose was: " how to extract all urls from a database and then check for brokens and not brokens" . This package not only retrieve urls from a given mysql database but also from all databases on this server if asked. The package go trought all chosen databases or all databases on server and for each found table retrieve all urls found in the columns with datatype==string ... Then user can with another method check for brokens... The package use the old mysql api but assure the ascending compatibility with all versions of PHP with the innovative package of Dave Smith mysql to mysqli so for thoses who will get the ugly warning about deprecated functions don't worry and just turn off error reporting or disable your old mysql extension in the PHP.ini... The package is well commented and the functions names talk themselves for more information please look in the example file or feel free to ask your questions or report issues in the forum or contact me personally at leizmo@gmail.com... ps: be sure to complete the list of protected database in the class source. private $protectedDatabases=array('information_schema','innodb_index_stats','performance_schema','mysql');

  Files folder image Files (5)  
File Role Description
Plain text file mysql2i.class.php Class mysql to mysqli class source
Accessible without login Plain text file mysql2i.func.php Aux. mysql to mysqli api
Accessible without login Plain text file readme.txt Doc. readme
Accessible without login Plain text file testUrlsFT.php Example example script
Plain text file Urls_From_tables.class.php Class class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:172
This week:0
All time:8,819
This week:39Up