PHP Classes

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

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 171 This week: 1All time: 8,820 This week: 560Up
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 is available for providing paid consulting. Contact zinsou A.A.E.Moïse .
Classes: 50 packages by
Country: Benin Benin
Age: 34
All time rank: 6781 in Benin Benin
Week rank: 106 Up1 in Benin Benin Equal
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  
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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:171
This week:1
All time:8,820
This week:560Up