Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated database handling and html parsing and increased integration for plugins #8

Open
wants to merge 140 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
e17caa3
Update README
sendtogeo Jun 5, 2015
90fd321
Delete README
sendtogeo Jun 5, 2015
7ea0bdf
Create README.md
sendtogeo Jun 5, 2015
ab93d52
Seo Panel 3.7.0
Jun 5, 2015
66453f3
Update 3.6.0 -> 3.7.0
szepeviktor Jun 6, 2015
d2156ba
reset $supportClass in adminmenu.ctp.php×2
szepeviktor Jun 6, 2015
0ef9841
Merge pull request #1 from szepeviktor/version_num
sendtogeo Jun 6, 2015
d5386d7
Merge pull request #4 from szepeviktor/reset-supportClass
sendtogeo Jun 6, 2015
c483439
seopanel.v.3.8.0 - Changes to fix the database text values short tag …
Jun 9, 2015
2089cc7
Merge branch 'master' of https://github.com/seopanel/Seo-Panel
Jun 9, 2015
c644b4d
Merge cron's separate debug property with SP_DEBUG
szepeviktor Aug 26, 2015
d90dcc0
v.3.8.0 - Adding changes for payment plugin
Sep 2, 2015
6bbca8a
adding git ignore file
Sep 2, 2015
bbe72a7
.git ignore file changes
Sep 2, 2015
1333357
seo panel 3.8.0 - Adding currency related changes
Sep 7, 2015
b2fb95b
seo panel 3.8.0 - adding .gitignore changes
Sep 7, 2015
51ffa8d
seo panel 3.8.0 - currency settings changes
Sep 8, 2015
ff8db9d
seo panel 3.8.0 - currency settings changes
Sep 17, 2015
dccca4c
seo panel 3.8.0: To fix the forgot password button not showing error
Oct 20, 2015
0a1b020
Merge pull request #6 from szepeviktor/merge-cron-debug
sendtogeo Oct 20, 2015
60fa4f8
Update cron.ctrl.php
sendtogeo Oct 21, 2015
b7b702a
seo panel 3.8.0 - Adding website import feature
Nov 18, 2015
6a870bc
seo panel 3.8.0 - Adding the ssl bypass fix and header provding option
Nov 30, 2015
df1d04a
Test
drao-aqorn Dec 8, 2015
ddd8ec6
add tmp folder
gvarghese123 Dec 9, 2015
f9ef4e6
add tmp folder
gvarghese123 Dec 9, 2015
8ae60be
new table for user specs
gvarghese123 Dec 9, 2015
74eb385
new table for user specs
sendtogeo Dec 9, 2015
5493684
User type changes
deepthyraor Dec 10, 2015
11b3943
seo panel 3.8.0 - website import feature
Dec 11, 2015
d727603
seo panel 3.8.0 - minor fixes
Dec 11, 2015
5a892cc
User type edits
deepthyraor Dec 12, 2015
8bd1a23
seo panel 3.8.0 - adding pagination to dashboard
Dec 15, 2015
f9f436c
seo panel 3.8.0 - user expiry date setup
Dec 16, 2015
cdd0e46
Changes for adding website / keyword count checking for user types
deepthyraor Dec 17, 2015
823f132
seo panel 3.8.0 - changes to filters
Dec 17, 2015
8032480
seo panel 3.8.0 - to get default user id and admin id
Dec 18, 2015
65c8d2f
seo panel 3.8.0 - The changes for subscription
sendtogeo Dec 19, 2015
9ebe4c3
seo panel 3.8.0 : changes for pagination in keyword report summary
sendtogeo Dec 19, 2015
e1863d0
seo panel 3.8.0 : changes for pagination in keyword report summary
sendtogeo Dec 19, 2015
e2e55c6
seo panel 3.8.0 : changes for pagination in archive report summary
sendtogeo Dec 21, 2015
94a1a23
seo panel 3.8.0 : changes for pagination in archive report summary
sendtogeo Dec 21, 2015
c4ea458
seo panel 3.8.0 : subscription changes
Dec 22, 2015
ce3a446
seo panel 3.8.0 : subscription changes
Dec 23, 2015
4ae4524
seo panel 3.8.0 - small cosmetic changes
Dec 31, 2015
1a05c1b
seo panel 3.8.0 - subscription module changes
Dec 31, 2015
a123414
seo panel 3.8.0 - subscription module changes
Dec 31, 2015
770c1d0
seo panel 3.8.0 - subscription module changes
Jan 1, 2016
875f157
seo panel 3.8.0 - cosmetic changes
Jan 2, 2016
67129de
seo panel 3.8.0 - cosmetic changes
Jan 4, 2016
2cd54e9
seo panel 3.8.0 - cosmetic changes
Jan 4, 2016
0d0360a
seo panel 3.8.0 - copying changes to simple theme
Jan 4, 2016
8975c96
seo panel 3.8.0 - copying changes to simple theme
Jan 4, 2016
afe4705
seo panel 3.8.0 - cosmetic changes
Jan 5, 2016
b5373ea
seo panel 3.8.0 - cosmetic changes
sendtogeo Jan 6, 2016
11388de
seo panel 3.8.0 - cosmetic changes
Jan 6, 2016
7affc6a
seo panel 3.8.0 - cosmetic changes
Jan 6, 2016
d12661d
seo panel 3.8.0 - cosmetic changes
Jan 6, 2016
8c8fb6c
seo panel 3.8.0 - cosmetic changes
Jan 6, 2016
16a2a7c
seo panel 3.8.0 - cosmetic changes
Jan 6, 2016
06e9dd6
seo panel 3.8.0 - cosmetic changes
Jan 6, 2016
c2198da
Seo panel 3.8.0 - Adding all changes from develop
sendtogeo Jan 7, 2016
ca5cdb8
seo panel demo changes
sendtogeo Jan 8, 2016
fdbfdea
Merge pull request #23 from seopanel/develop
sendtogeo Jan 8, 2016
e70315e
seo panel 3.9.0 - cosmetic changes
Jan 14, 2016
f09c3f3
seo panel 3.8.1 - changes to fix the https link detection issue
Feb 4, 2016
3c3ccbe
seo panel 3.8.1 - To fix teh issue with reciprocal filter
Feb 10, 2016
54d62af
seo panel 3.9.0 - cosmetic changes
Feb 26, 2016
c44967f
seo panel 3.9.0: to fix the php tag issues
Apr 6, 2016
c5157f2
reverting config file changes
Apr 6, 2016
e065491
fix issue #35
sendtogeo May 28, 2016
d76605b
fix issue #34
sendtogeo May 28, 2016
047eef9
fix issue #41
sendtogeo May 28, 2016
29f4626
fix issue #26
sendtogeo May 28, 2016
6a480e9
3.9.0 changes
sendtogeo May 28, 2016
b1b27c6
fix issue #13
sendtogeo May 28, 2016
62ec9a0
fix issue #38
sendtogeo May 28, 2016
76572c2
fix issue #40
sendtogeo May 28, 2016
4f51763
3.9.0 changes
sendtogeo May 28, 2016
fc9d16c
keyword report summary changes
May 30, 2016
de9c4c0
keyword postion summary changes #36 #37
sendtogeo May 31, 2016
418d219
revert unwanted commit
sendtogeo May 31, 2016
8b0b109
keyword report summary changes #36 #37
May 31, 2016
57fc552
keyword postion summary changes #36 #37
sendtogeo Jun 1, 2016
2b97cef
fixed issue #28 static function call issue
Jun 1, 2016
6e0e38e
fixed issue #27 phpmailer new version
Jun 2, 2016
f27733e
fixed issue #21
Jun 2, 2016
66f4da9
fixed issue #21
Jun 2, 2016
dd42550
replace google pagerank with moz rank
Jun 4, 2016
462a52f
replace google pagerank with moz rank #40
sendtogeo Jun 6, 2016
50f091a
changes for dashboard #44
Jun 6, 2016
69a9cb4
changes for check connection of moz rank settings
Jun 8, 2016
49fcc4d
replace google pagerank with moz rank #40
sendtogeo Jun 9, 2016
c36e939
to fix #48
Jun 14, 2016
c26c67a
seo panel final changes for 3.9.0
Jun 14, 2016
c8134c7
seo panel 3.9.0 changes
Jun 14, 2016
98d20af
seo panel 3.9.0 changes
Jun 14, 2016
7db68fe
to order crawl log
Jun 15, 2016
01e4724
Merge pull request #49 from seopanel/develop
sendtogeo Jun 15, 2016
bc4bd6a
seo panel 3.9.0 cosmetic changes
Jun 15, 2016
ff229fc
Merge pull request #50 from seopanel/develop
sendtogeo Jun 15, 2016
65006f5
Added hooks functionality
CreaoticX Jul 24, 2016
c9d7e43
Added common functions for using hooks
CreaoticX Jul 24, 2016
ba73adf
Added load capability for plugins
CreaoticX Jul 24, 2016
dfecaef
Fixed plugin load path
CreaoticX Jul 24, 2016
e287760
Altered the Bar Menu
CreaoticX Jul 24, 2016
5f09f9d
Added MySqli Handler and Wrapper
CreaoticX Jul 24, 2016
b955dcd
Add setting functions
CreaoticX Jul 25, 2016
a21201f
Fixed get_setting_value
CreaoticX Jul 25, 2016
8dc13b5
Added PHP HTML Parser
CreaoticX Jul 25, 2016
2888907
Added meta tables and functions
CreaoticX Jul 27, 2016
94a57a2
Made formatUrl function more precise
CreaoticX Jul 28, 2016
37c6f3a
Updated getPageInfo and related functions
CreaoticX Jul 29, 2016
ee0c90a
Fixed str_replace error
CreaoticX Jul 29, 2016
b2a8d30
Fixed URL formatting and added filter info
CreaoticX Jul 29, 2016
d972766
Fixed URL formatting errors
CreaoticX Jul 29, 2016
6f9d2d3
Removed duplicate home page entries and changed broken link check
CreaoticX Jul 29, 2016
21c7ae5
Added Update Setting Function
CreaoticX Jul 30, 2016
b15019c
Updated Settings to Allow For Arrays
CreaoticX Jul 30, 2016
06a34e2
Added ability to prevent settings from being defined
CreaoticX Jul 30, 2016
5a11fe3
Updated database handler and added filters to auditor component
CreaoticX Jul 30, 2016
73cb834
Merge branch 'develop' of https://github.com/seopanel/Seo-Panel
CreaoticX Jul 30, 2016
2b2ea66
Created dynamic scoring and editting of scoring settings
CreaoticX Aug 1, 2016
7344b2f
Fixed scoring algorithm
CreaoticX Aug 1, 2016
4d8c687
fixed untracked files
CreaoticX Aug 1, 2016
f8f194f
Reverted Classic theme
CreaoticX Aug 1, 2016
f72aefb
Load Scores
CreaoticX Aug 1, 2016
2ecab40
Fixed Score Broken Link File name
CreaoticX Aug 1, 2016
a404dc0
Check for non-array passed to validate settings
CreaoticX Aug 1, 2016
8f5a080
Changed Score Class variables for Private to Protected
CreaoticX Aug 2, 2016
483ea99
Added default label to Score Settings
CreaoticX Aug 2, 2016
6d61676
Added Active state to Score Class
CreaoticX Aug 2, 2016
001fdbf
Removed Deactivated Scores From scoring algorithm
CreaoticX Aug 2, 2016
1d5c17e
Moved Active check in Score Class
CreaoticX Aug 3, 2016
569ce90
Check for runkit_constant_redefine function
CreaoticX Aug 3, 2016
d269647
Bug Fixed Save Settings
CreaoticX Aug 3, 2016
34b09d0
Added Website Average Page Score
CreaoticX Aug 3, 2016
63083c1
Separate functions for calculating score and weighted score and added…
CreaoticX Aug 4, 2016
7327a24
Load new project score for pages average score
CreaoticX Aug 4, 2016
b4000d7
Merge pull request #1 from seopanel/master
CreaoticX Aug 10, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 252 additions & 0 deletions PHPHtmlParser/Content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
<?php
namespace PHPHtmlParser;

/**
* Class Content
*
* @package PHPHtmlParser
*/
class Content
{

/**
* The content string.
*
* @var string
*/
protected $content;

/**
* The size of the content.
*
* @var integer
*/
protected $size;

/**
* The current position we are in the content.
*
* @var integer
*/
protected $pos;

/**
* The following 4 strings are tags that are important to us.
*
* @var string
*/
protected $blank = " \t\r\n";
protected $equal = ' =/>';
protected $slash = " />\r\n\t";
protected $attr = ' >';

/**
* Content constructor.
*
* @param $content
*/
public function __construct($content)
{
$this->content = $content;
$this->size = strlen($content);
$this->pos = 0;
}

/**
* Returns the current position of the content.
*
* @return int
*/
public function getPosition()
{
return $this->pos;
}

/**
* Gets the current character we are at.
*
* @param int $char
* @return string
*/
public function char($char = null)
{
$pos = $this->pos;
if ( ! is_null($char)) {
$pos = $char;
}

if ( ! isset($this->content[$pos])) {
return '';
}

return $this->content[$pos];
}

/**
* Moves the current position forward.
*
* @param int $count
* @return $this
*/
public function fastForward($count)
{
$this->pos += $count;

return $this;
}

/**
* Moves the current position backward.
*
* @param int $count
* @return $this
*/
public function rewind($count)
{
$this->pos -= $count;
if ($this->pos < 0) {
$this->pos = 0;
}

return $this;
}

/**
* Copy the content until we find the given string.
*
* @param string $string
* @param bool $char
* @param bool $escape
* @return string
*/
public function copyUntil($string, $char = false, $escape = false)
{
if ($this->pos >= $this->size) {
// nothing left
return '';
}

if ($escape) {
$position = $this->pos;
$found = false;
while ( ! $found) {
$position = strpos($this->content, $string, $position);
if ($position === false) {
// reached the end
$found = true;
continue;
}

if ($this->char($position - 1) == '\\') {
// this character is escaped
++$position;
continue;
}

$found = true;
}
} elseif ($char) {
$position = strcspn($this->content, $string, $this->pos);
$position += $this->pos;
} else {
$position = strpos($this->content, $string, $this->pos);
}

if ($position === false) {
// could not find character, just return the remaining of the content
$return = substr($this->content, $this->pos, $this->size - $this->pos);
$this->pos = $this->size;

return $return;
}

if ($position == $this->pos) {
// we are at the right place
return '';
}

$return = substr($this->content, $this->pos, $position - $this->pos);
// set the new position
$this->pos = $position;

return $return;
}

/**
* Copies the content until the string is found and return it
* unless the 'unless' is found in the substring.
*
* @param string $string
* @param string $unless
* @return string
*/
public function copyUntilUnless($string, $unless)
{
$lastPos = $this->pos;
$this->fastForward(1);
$foundString = $this->copyUntil($string, true, true);

$position = strcspn($foundString, $unless);
if ($position == strlen($foundString)) {
return $string.$foundString;
}
// rewind changes and return nothing
$this->pos = $lastPos;

return '';
}

/**
* Copies the content until it reaches the token string.,
*
* @param string $token
* @param bool $char
* @param bool $escape
* @return string
* @uses $this->copyUntil()
*/
public function copyByToken($token, $char = false, $escape = false)
{
$string = $this->$token;

return $this->copyUntil($string, $char, $escape);
}

/**
* Skip a given set of characters.
*
* @param string $string
* @param bool $copy
* @return $this|string
*/
public function skip($string, $copy = false)
{
$len = strspn($this->content, $string, $this->pos);

// make it chainable if they don't want a copy
$return = $this;
if ($copy) {
$return = substr($this->content, $this->pos, $len);
}

// update the position
$this->pos += $len;

return $return;
}

/**
* Skip a given token of pre-defined characters.
*
* @param string $token
* @param bool $copy
* @return null|string
* @uses $this->skip()
*/
public function skipByToken($token, $copy = false)
{
$string = $this->$token;

return $this->skip($string, $copy);
}
}
41 changes: 41 additions & 0 deletions PHPHtmlParser/Curl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
namespace PHPHtmlParser;

use PHPHtmlParser\Exceptions\CurlException;

/**
* Class Curl
*
* @package PHPHtmlParser
*/
class Curl implements CurlInterface
{

/**
* A simple curl implementation to get the content of the url.
*
* @param string $url
* @return string
* @throws CurlException
*/
public function get($url)
{
$ch = curl_init($url);

if ( ! ini_get('open_basedir')) {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
}

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);

$content = curl_exec($ch);
if ($content === false) {
// there was a problem
$error = curl_error($ch);
throw new CurlException('Error retrieving "'.$url.'" ('.$error.')');
}

return $content;
}
}
19 changes: 19 additions & 0 deletions PHPHtmlParser/CurlInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
namespace PHPHtmlParser;

/**
* Interface CurlInterface
*
* @package PHPHtmlParser
*/
interface CurlInterface
{

/**
* This method should return the content of the url in a string
*
* @param string $url
* @return string
*/
public function get($url);
}
Loading