Hello,

I do not understand why the simplehtmldom is failing.
This is the code:

<?php

ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);

  //---
  include_once('simplehtmldom_1_9_1/simple_html_dom.php');
  //---
  $url = "https://victoriousseo.com/sitemap_index.xml";
  $html = new simple_html_dom();
  $html->load_file($url);
  //--
  foreach($html->find("a") as $link)
  {
    echo $link->href."< br />";
  }
?>

I got the simplehtmldom.php on the same directory as the file that has the above crawler code.
I get no error.

And, checkout the sitemap if you must as it does exist:
https://victoriousseo.com/sitemap_index.xml

And so, I do not understand why the code extracts nothing. I see a complete blank page.
Code from a tuturial:
http://timvanosch.blogspot.com/2013/02/php-tutorial-making-webcrawler.html

This is a shot in the dark, but after quickly looking at the docs, I believe the issue is that you are trying to parse an XML document using an HTML parser.

In line 14, you are specifically looking for 'a' tags. The xml file you linked does not have any 'a' tags. Because there are no 'a' tags, the are also no 'href' attributes (see line 16). That is why you don't get an error and a blank page (with no results for 'a' tags).

With an XML parser (again, a shot in the dark here), you would want to look for the 'loc' tag, which is what contains the url. I am not sure (because I haven't tested it) if simplehtmldom can find 'loc' tags.

@gce517

You are spot-on! Thanks!
Someone pointed this out to me just now too.

Anyway, so we got to change this:

foreach($html->find("a") as $link)

to what exactly to extract the links from the xml ?

Well, I don't really know because I did not explore the docs in detail. However, I'd recommend you use an XML parser, which would be (ideally) designed to parse XML files, specifically.

If you still want to use simplehtmldom, you may want to try something like (not tested):

foreach($html->find("loc") as $link) {
    var_dump($link);
}

And see what you get as $link.

@gce517

Try the code on your localhost. See what happens. Your browser will freeze as the script will spit a neverending text.
Anyway, I tried it with this code instead:

include_once('simplehtmldom_1_9_1/simple_html_dom.php');
  //---
  $url = "https://www.rocktherankings.com/post-sitemap.xml";
  $html = new simple_html_dom();
  $html->load_file($url);
  //--
  foreach($html->find("loc") as $link)
  {
    echo $link->href."< br />";
  }

Guess what ? My browser spits:
< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />< br />

That is very odd indeed.
Using Chrome.

@gce517

This is working fine so do check it out:

include_once('simplehtmldom_1_9_1/simple_html_dom.php');
  //---
  $url = "https://www.rocktherankings.com/post-sitemap.xml";
  $html = new simple_html_dom();
  $html->load_file($url);
  //--
  foreach($html->find("loc") as $link)
  {
    echo $link->innertext."<br>";
  }
commented: Alright! +1

That is already "procedural." The only oop elements there are the objects that you are traversing.

First, you are iterating through the $xml->url object. Each item in the object is an object itself ($urlElement), with certain properties (loc, lastmod, etc.).

Think of each object as an array and each property as a key => value pair: loc is a property (key) of the $urlElement object, with a value (an actual url) assigned to it. In fact, it is unnecessary to assign the property values to another variable. You can just echo them directly, thus:

echo 'lastmod: '. $urlElement->lastmod . '<br>';

@dani

Care to close this thread as simplehtmldom seems to be working afterall. My mistake!

I'm glad you got it working. I'll mark this question as solved. That being said, why use simple_html_dom.php at all? I use PHP's built-in DomDocument class as so:

// Initiate ability to manipulate the DOM and load that baby up
$doc = new DOMDocument();
libxml_use_internal_errors(true);
$doc->loadHTML($message, LIBXML_NOENT|LIBXML_COMPACT);
libxml_clear_errors();

// Fetch all <a> tags
$links = $doc->getElementsByTagName('a');

// If <a> tags exist ...
if ($links->length > 0)
{
    // For each <a> tag ...
    foreach ($links AS $link)
    {
        $link->setAttribute('class', 'link-style');
    }
}

// Because we are actually manipulating the DOM, DOMDocument will add complete <html><body> tags we need to strip out
$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));

If you need the html to be loaded from a file, you can do:

$message = file_get_contents('https://...');

It works for XML manipulation as well: https://www.php.net/manual/en/book.simplexml.php

Good luck!

@dani

Thanks a lot!
I will try amending the code.

@gce517

I do not understand what an object is. Still at procedural style.

I do not understand what an object is. Still at procedural style.

I am trying to teach you as there's no way for you to accomplish what you're trying to do without it. It's not possible for the code to realistically be converted to procedural style. What you're asking is akin to saying "I don't understand function calls or loops. Rewrite this code without any function calls or loops."

@dani

I see blank page.
Where did I go wrong on these two ?
Note where the $message variable is on both.

1

// Initiate ability to manipulate the DOM and load that baby up
$doc = new DOMDocument();
libxml_use_internal_errors(true);

// Because we are actually manipulating the DOM, DOMDocument will add complete <html><body> tags we need to strip out
//$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));
$message = file_get_contents('https://www.rocktherankings.com/post-sitemap.xml');

$doc->loadHTML($message, LIBXML_NOENT|LIBXML_COMPACT);
libxml_clear_errors();

// Fetch all <a> tags
$links = $doc->getElementsByTagName('a');

// If <a> tags exist ...
if ($links->length > 0)
{
    // For each <a> tag ...
    foreach ($links AS $link)
    {
        $link->setAttribute('class', 'link-style');
    }
}

2

// Initiate ability to manipulate the DOM and load that baby up
$doc = new DOMDocument();

// Because we are actually manipulating the DOM, DOMDocument will add complete <html><body> tags we need to strip out
//$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));
$message = file_get_contents('https://www.rocktherankings.com/post-sitemap.xml');
//$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));

libxml_use_internal_errors(true);
$doc->loadHTML($message, LIBXML_NOENT|LIBXML_COMPACT);
libxml_clear_errors();

// Fetch all <a> tags
$links = $doc->getElementsByTagName('a');

// If <a> tags exist ...
if ($links->length > 0)
{
    // For each <a> tag ...
    foreach ($links AS $link)
    {
        $link->setAttribute('class', 'link-style');
    }
}

I get undefined $message if I leave it at the bottom. So, I tried rearranging to the 2 you see above.

@dani

Where did I go wrong on your code on my previous post ?

Where did I go wrong on your code on my previous post ?

You commented out // $message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));, which is supposed to be at the end of the code. That's why it doesn't work.

Also, that code loads an HTML page and looks for <a> tags. You can't use it on an XML sitemap file. The code was just supposed to be an example of me teaching you OOP.

@dani

Looking at crawlers again after 5 months.
Did I understand your code right ?
Because neither the following 2 working ...

<?php

ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);

//Sitemap Protocol: https://www.sitemaps.org/protocol.html
// Initiate ability to manipulate the DOM and load that baby up
$doc = new DOMDocument();
libxml_use_internal_errors(true);

// Because we are actually manipulating the DOM, DOMDocument will add complete <html><body> tags we need to strip out
$message = file_get_contents('https://www.daniweb.com/programming/web-development/threads/538868/simplehtmldom-failing#post2288453');
$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));

$doc->loadHTML($message, LIBXML_NOENT|LIBXML_COMPACT);
libxml_clear_errors();

// Fetch all <a> tags
$links = $doc->getElementsByTagName('loc');

// If <a> tags exist ...
if ($links->length > 0)
{
    // For each <a> tag ...
    foreach ($links AS $link)
    {
        $link->setAttribute('class', 'link-style');
    }
}

?>
<?php

ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);

//Sitemap Protocol: https://www.sitemaps.org/protocol.html
// Initiate ability to manipulate the DOM and load that baby up
$doc = new DOMDocument();
libxml_use_internal_errors(true);

// Because we are actually manipulating the DOM, DOMDocument will add complete <html><body> tags we need to strip out
$message = file_get_contents('https://www.daniweb.com/programming/web-development/threads/538868/simplehtmldom-failing#post2288453');


$doc->loadHTML($message, LIBXML_NOENT|LIBXML_COMPACT);
libxml_clear_errors();

// Fetch all <a> tags
$links = $doc->getElementsByTagName('loc');

// If <a> tags exist ...
if ($links->length > 0)
{
    // For each <a> tag ...
    foreach ($links AS $link)
    {
        $link->setAttribute('class', 'link-style');
    }
}
$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));
?>

Note that, unlike last time, I am not trying to extract links from an xml link. Notice where I am trying to extract from.

I’m on my phone so not able to pay close attention, but the second version in your latest post is on the right track. Are you getting an error message?

@dani

Sorry for the late reply. Just saw your response.
I see a complete blank white page.

<?php

ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);

//4. Dan's Code.

//Code from: https://www.daniweb.com/programming/web-development/threads/538868/simplehtmldom-failing#post2288453
//Sitemap Protocol: https://www.sitemaps.org/protocol.html
// Initiate ability to manipulate the DOM and load that baby up
$doc = new DOMDocument();

// Because we are actually manipulating the DOM, DOMDocument will add complete <html><body> tags we need to strip out
//$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));
$message = file_get_contents('https://www.daniweb.com/programming/web-development/threads/538868/simplehtmldom-failing#post2288453');

libxml_use_internal_errors(true);
$doc->loadHTML($message, LIBXML_NOENT|LIBXML_COMPACT);
libxml_clear_errors();

// Fetch all <a> tags
$links = $doc->getElementsByTagName('a');

// If <a> tags exist ...
if ($links->length > 0)
{
    // For each <a> tag ...
    foreach ($links AS $link)
    {
        $link->setAttribute('class', 'link-style');
    }
}

$message = str_replace(array('<body>', '</body>'), '', $doc->saveHTML($doc->getElementsByTagName('body')->item(0)));


?>

Perhaps errors are being written to a log file somewhere?

Or ... you might also be getting a blank white page, not because of a fatal error, but because there's no code here that is echo'ing anything out, so the expectation is that the page should be blank. Try adding:

echo $message;

at the end.

@dani

Oops! Sorry! I missed your reply.
The page is not empty. See for yourself:
https://www.rocktherankings.com/post-sitemap.xml

Anyway, I did as you asked and get this echoed on screen:

https://www.rocktherankings.com/footer-links-seo/ 2022-03-14T13:19:37+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/footer-links-example-1024x977.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/footer-links-example2-1024x257.png https://www.rocktherankings.com/seo-quick-wins/ 2022-05-20T23:30:31+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/SEO-Quick-Wins_-Ways-to-Discover-Opportunites.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/gq-search-1024x133.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gq-search-count-1024x199.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/tech-crunch-duplicate-1024x209.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/techcrunch-tags-1024x381.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gq-test-page-1024x236.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-tc-1024x110.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-keywords-319x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-keywords-filter-1024x83.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/tc-results-1024x544.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/tc-ahrefs-filter-1024x138.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/mobile-friendly-test-1024x798.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-stat-1024x215.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-stat2-1024x253.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-stat3-1024x259-1.jpg  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-bounce-stat.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/avg-speed-index.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/tc-load-time-1024x664.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/local-seo-map-1024x997-1.jpg  https://www.rocktherankings.com/wp-content/uploads/2022/03/tours-rome-search-query-1024x840-1.jpg https://www.rocktherankings.com/what-is-cro/ 2022-05-20T23:35:26+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/What-is-CRO_-Conversion-Rate-Optimization-Broken-Down.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/seo-vs-cro.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ab-testng.png https://www.rocktherankings.com/how-to-get-higher-google-rankings/ 2022-05-21T00:20:22+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/02/How-to-Get-Higher-Google-Rankings_-5-SEO-Tactics-You-Can-Implement-Now.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-1024x452.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/meta-example-1024x448.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/searches-related-1024x320.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/nat-geo-results-1024x195.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-example-1024x412.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-example-ctr-646x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/SA-reviews-snowtubing-759x1024.png https://www.rocktherankings.com/how-long-does-seo-take/ 2022-05-21T22:04:58+00:00  https://www.rocktherankings.com/wp-content/uploads/2020/10/How-Long-Does-SEO-Take-to-Work_.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/SEO-1024x597.png https://www.rocktherankings.com/wordpress-301-redirect/ 2022-05-21T22:07:33+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/image.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-1-1024x404.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/redirection-plugin-1024x208.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/1_image-2.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/redirection-plugin-settings.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ftp-client.png https://www.rocktherankings.com/sitemap-examples/ 2022-05-21T22:48:14+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/xml-sitemap-example-1024x440.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/add-sitemap-1024x451.png https://www.rocktherankings.com/travel-seo-tips/ 2022-05-21T23:25:16+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/things-to-do-in-rome-1024x570.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/travel-micro-moments-853x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/kw-intent-funnel-1024x565.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/nyc-results-994x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/SA-Boston-Insights-1024x501.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/SA-Boston-1024x587.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/sourced-traffic-1024x261.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/seasonality-1024x342.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ga-example-1024x636.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-travel-seo-1024x934.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/landing-pages-1005x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/organic-goals-1024x991.png https://www.rocktherankings.com/b2b-seo/ 2022-06-22T18:12:37+00:00  https://www.rocktherankings.com/wp-content/uploads/2020/03/B2B-SEO-Best-Practice-for-Generating-Organic-Leads.svg  https://www.rocktherankings.com/wp-content/uploads/2022/05/b2b-seo-three.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/car-dealer-near-me-1024x578.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/automotive-dealer-near-me-1024x571.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-3-1024x570.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-4-1024x567.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-rtr-1024x112.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-keywords-319x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-keywords-results-1024x494.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-lms-1024x504.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-lms-results-1024x413.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-keyword-ideas-1024x320.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-backlinko-1024x99.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-backlinko-top-pages-315x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-backlino-oragnic-kws-1024x493.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/b2b-keyword-mapping.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/hubspot-example-1024x35.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-2-1024x433.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-1-1024x89.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-backlinks.png https://www.rocktherankings.com/seo-campaign/ 2022-06-22T18:14:54+00:00  https://www.rocktherankings.com/wp-content/uploads/2020/05/How-to-Launch-an-SEO-Campaign-Expert-Guide.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/what-is-cro-1-1024x569.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/url-example-1024x159.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/seo-campaign-meta-1024x582.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/first-100-words-example-1024x647.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/internal-linking-example-1024x232.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-keyword-explorer2-1024x45.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/arabica-coffee-search-1024x500.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-kw-results2-1024x290.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/how-to-make-coffee-1024x437.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/coffee-keywords-1024x462.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-autocomplete-1024x538.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-backlinks.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/prepory-bg-1024x491-1.jpg  https://www.rocktherankings.com/wp-content/uploads/2022/03/prep-stats2-1024x455.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/bad-email-outreach-example-1024x402.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ga-organic-1024x445.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-performance-tab.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-pages-overview-1024x524.png https://www.rocktherankings.com/local-keyword-research/ 2022-07-02T17:50:46+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/queries-431x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/local-keyword-search-query-1024x834.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-keyword-explorer-1024x780.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-keyword-result-1024x684.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/kw-difficulty.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/local-keyword-search-query-1-1024x834.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/autocomplete-1024x425.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/searches-related-1024x484.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/all-keyword-ideas-1024x881.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-search-bar-1024x110.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/organic-keywords-ahrefs-1024x768.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/top-pages-ahrefs-1024x485.png https://www.rocktherankings.com/rank-higher-google-maps/ 2022-07-02T17:50:50+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/02/How-to-Rank-Higher-on-Google-Maps-in-2022-Expert-Guide.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/map-pack-example-1024x924-1.jpg  https://www.rocktherankings.com/wp-content/uploads/2022/03/sign-in-1024x537.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-category-1024x741.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-address-1024x765.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-pab-975x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-sab-877x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-contact-details-1024x1019.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-finish-1024x787.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-verify-873x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-fully-complete-1024x628.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-category-1-788x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-description-1024x261.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-listing-example-reviews.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-gatherup-1024x869.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-post-example-665x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-post-example2-1024x452.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-post-example3-749x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-map-share1-1024x257.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-map-share2a.jpg  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-map-share3-1007x1024.png https://www.rocktherankings.com/local-seo-ranking-factors/ 2022-07-02T17:50:54+00:00  https://www.rocktherankings.com/wp-content/uploads/2021/10/Local-SEO-Ranking-Factors_-The-10-Factors-You-Should-Be-Influencing-Justin-Berg-22-Min-Reade2-1.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/example3-1024x194.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-1-1024x696.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-5-1024x975.png  https://www.rocktherankings.com/wp-content/uploads/2022/01/graph-test-1.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/cluster2-1024x964.png  https://www.rocktherankings.com/wp-content/uploads/2021/12/prepory-hp.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/localviking-1024x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-2.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-3-1024x381.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/img_622f3d8f362e6.png https://www.rocktherankings.com/local-seo-audit/ 2022-07-02T17:51:00+00:00  https://www.rocktherankings.com/wp-content/uploads/2021/10/7-Steps-to-Perform-a-Local-SEO-Audit-FAST.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-my-business-1024x608.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/3pack-921x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/pitts-seo-1024x692.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/mc-llp-347x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-1024x988.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/link-example.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/citation-audit-1024x663.png https://www.rocktherankings.com/local-lead-generation/ 2022-07-02T17:51:04+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/kw-intent-funnel-1024x565.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ccs-miami-1024x978.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/paid-ad-miami-1024x825.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/LLP-1-349x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/double-real-estate-511x1024.png https://www.rocktherankings.com/local-search-marketing/ 2022-07-02T17:51:09+00:00  https://www.rocktherankings.com/wp-content/uploads/2020/06/What-is-Local-Search-Marketing_-Everything-You-Need-to-Know.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/local-search-marketing-example-1024x933.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-listing-example-reviews.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/sa-review-snippet-1024x239.png https://www.rocktherankings.com/how-to-add-my-business-to-google-maps/ 2022-07-02T17:51:20+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/sign-in-1024x537.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-category-1024x741.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-address-1024x765.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-pab-975x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-sab-877x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-contact-details-1024x1019.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-finish-1024x787.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-verify-873x1024.png https://www.rocktherankings.com/seo-reputation-management/ 2022-07-02T17:51:21+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/gather-up-example.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/kw-intent-funnel-1024x565.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/walmart-reviews-1024x227.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/walmart-reviews2-1024x219.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/sa-review-snippet-1024x239.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/reviews-from-the-web-616x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/sonos-ad-1024x285.png https://www.rocktherankings.com/how-to-delete-a-google-review/ 2022-07-02T17:51:25+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/how-to-respond-to-a-google-review.gif  https://www.rocktherankings.com/wp-content/uploads/2022/03/how-to-remove-a-google-review-1024x835.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/flag-as-inappropriate-1024x236.png https://www.rocktherankings.com/google-my-business-categories/ 2022-07-02T17:51:41+00:00  https://www.rocktherankings.com/wp-content/uploads/2021/01/Google-My-Business-Categories-List-Updated-2022.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/dentist-example-1024x729.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/source-excerpt-1024x71.png https://www.rocktherankings.com/get-more-google-reviews/ 2022-11-07T15:25:56+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/03/local-map-pack-1024x580.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gmb-review-box-1024x976.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gather-up-extension-1024x188.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gatherup-follow-up-1024x575.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/sms-review-request-548x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-reviews-wordpress-plugin-1024x126.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/qr-code-775x1024.png https://www.rocktherankings.com/website-audit-checklist/ 2023-01-15T12:01:36+00:00  https://www.rocktherankings.com/wp-content/uploads/2020/05/Group-27.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/growth-1024x396.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/site-query-1024x142.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/site-query2-1024x429.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/index-bloat-1024x388.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/speed-rating-1024x647.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/pagespeed-insights-opportunities-1024x565.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/reduce-server-response-times-1024x691.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gtmetrix-results-1024x377.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/mobile-friendly-test-1024x798.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-coverage-440x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-broken-links-1024x492.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-errors-example-1024x327.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/sitemap-1024x275.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/new-sitemap-1024x391.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/crawl-issues-1024x496.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/google-analytics-overview-tab-485x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ga-date-range-1024x270.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/add-segment-ga-1024x210.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ga-segment-1024x448.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/organic-traffic-1024x381.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ga-decline-growth-1024x263.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/date-range-1-1024x637.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-date-range-795x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-headers2-1024x230.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-tabs-1024x195.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/gsc-ctr-642x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-keywords-319x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-keywords-filter-1024x83.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-organic-keywords-results-1024x171.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/content-gap-analysis-325x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/filter-content-gap-analysis-1024x76.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/filter-content-gap-analysis-results-1024x572.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/sa-rich-snippets-1024x273.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/markup-helper-1024x639.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/ahrefs-referring-domains-1024x408.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/referring-domains-1024x113.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/link-profile-ahrefs-1024x621.png https://www.rocktherankings.com/competitor-comparison-landing-pages/ 2023-01-20T11:31:38+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/07/Competitor-Comparsion-Pages-New.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-70.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-71.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-72.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-73.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-58.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-59.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-60.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-74.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-62.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-63.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-64.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-65.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-66.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-69.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-68.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-57.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-61.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-54.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-55.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-56.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-51.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-52.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-53.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/SaaS-Competitor-Comparison-Page-Template-CTA.svg https://www.rocktherankings.com/saas-keyword-research/ 2023-01-22T14:51:26+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/07/saas-keyword-research.svg  https://www.rocktherankings.com/wp-content/uploads/2022/05/b2b-keyword-mapping.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-2.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-3.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-4.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-7.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-16.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-17.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-12.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-11.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-13.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-14.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-10.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-15.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-8.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-9.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-8.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-9.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/alt-page.png https://www.rocktherankings.com/saas-content-writing/ 2023-01-29T12:46:50+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/10/B2B-SaaS-Content-Writing.svg  https://www.rocktherankings.com/wp-content/uploads/2022/10/saas-example-gsc.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/SaaS-Buyer-Matrix-1.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.09.31.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.18.06.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.20.47.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.57.32.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-4.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/image-3.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.32.35.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.34.59.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.36.36.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.33.00.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/toc-example.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/Screenshot-2022-10-27-at-16.44.10.png https://www.rocktherankings.com/saas-internal-linking/ 2023-01-29T12:46:54+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/09/SaaS-Internal-Linking-Strategy.svg  https://www.rocktherankings.com/wp-content/uploads/2022/09/headernav.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/footernav.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/example-mon.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-1.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-11.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-9.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-10.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-3.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-4.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-5.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-6.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-7.png  https://www.rocktherankings.com/wp-content/uploads/2022/09/image-8.png https://www.rocktherankings.com/saas-seo-mistakes/ 2023-01-29T12:47:43+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/07/Common-SaaS-SEO-Mistakes.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-48.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-40.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-49.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-50.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-41.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-43.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-44.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-45.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-46.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/clockify-ahrefs.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-47.png https://www.rocktherankings.com/ppc-for-saas/ 2023-01-29T12:49:38+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/07/PPC-for-SaaS.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-101.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-102.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-100.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-97.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-99.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-103.png https://www.rocktherankings.com/saas-link-building/ 2023-01-29T12:50:12+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/07/SaaS-Linkbuilding.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/clockify-ahrefs.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-27.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-36.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-28.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-29.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-31.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-37.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-25.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-26.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-38.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-33.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-34.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-39.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-35.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-3.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-4.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-5.png https://www.rocktherankings.com/saas-seo-tools/ 2023-01-29T12:50:53+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/07/SaaS-SEO-Tools.svg  https://www.rocktherankings.com/wp-content/uploads/2022/06/ahrefs.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/semrush-hp.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/google-trends.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/keywords-everywhere.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-18.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-19.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/clearscope-hp.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-6.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-7.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-23.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-22.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-20.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-21.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-24.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/google-analytics.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/gsc.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-6.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-5.png https://www.rocktherankings.com/on-page-seo-checklist/ 2023-01-29T12:51:22+00:00  https://www.rocktherankings.com/wp-content/uploads/2020/12/On-Page-SEO-Checklist_-The-Top-On-Page-Ranking-Factors.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-4-1024x134.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-5-1024x144.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/p-13.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-6-1024x130.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-7-1024x508.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-8-1024x840.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-9-524x1024.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-10-1024x658.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-11.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-3-1024x803.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-12-1024x269.png https://www.rocktherankings.com/content-brief/ 2023-01-29T12:51:39+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/05/SEO-Content-Brief.svg  https://www.rocktherankings.com/wp-content/uploads/2022/05/content-brief-2.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/1334eebd28584f1d8ca9588a3f95f891-1.jpg  https://www.rocktherankings.com/wp-content/uploads/2022/05/msv-tech-consult.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/msv2.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/image.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/image-1.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/content-brief2.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/comps.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/internal-links.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/roadmap.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/ex1.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/ex2.png  https://www.rocktherankings.com/wp-content/uploads/2022/05/visual-cta-1.png https://www.rocktherankings.com/saas-marketing-strategy/ 2023-01-30T11:28:23+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/11/Grow-Faster-Framework.svg  https://www.rocktherankings.com/wp-content/uploads/2022/11/Three-Cs.svg  https://www.rocktherankings.com/wp-content/uploads/2022/10/B2B-SaaS-Content-Writing.svg  https://www.rocktherankings.com/wp-content/uploads/2022/11/SaaS_Funnel.png  https://www.rocktherankings.com/wp-content/uploads/2022/11/SaaS-Buyer-Matrix.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/clockify-ahrefs.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-27.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-28.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-29.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-25.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-26.png  https://www.rocktherankings.com/wp-content/uploads/2022/11/Post-Graph-SEO-vs-Paid.png  https://www.rocktherankings.com/wp-content/uploads/2022/11/Scale-Up-2.svg https://www.rocktherankings.com/b2b-saas-copywriting/ 2023-02-05T12:35:57+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/10/B2B-SaaS-Copywriting-1.svg  https://www.rocktherankings.com/wp-content/uploads/2022/10/image.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/SaaS-LP-Template-Blog-Post-1.svg  https://www.rocktherankings.com/wp-content/uploads/2022/10/image-1.png https://www.rocktherankings.com/saas-website-redesign/ 2023-02-08T09:48:48+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/01/SaaS-Website-Redesign.svg  https://www.rocktherankings.com/wp-content/uploads/2023/01/Screenshot-2023-01-14-at-11.35.36.png  https://www.rocktherankings.com/wp-content/uploads/2023/01/image.png https://www.rocktherankings.com/saas-seo/ 2023-02-08T09:50:27+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/06/saas-seo.svg  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-13-1024x877.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-14-1024x815.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/cvent-lander-1024x594.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/backlinks-1024x608.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-21-1024x419.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-20-1024x279.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-22-1024x350.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-18-1024x409.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-19-1024x434.png  https://www.rocktherankings.com/wp-content/uploads/2022/03/image-17-1024x169.png https://www.rocktherankings.com/saas-video-marketing/ 2023-02-08T09:53:48+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/01/Group-86.svg https://www.rocktherankings.com/technical-seo-saas/ 2023-02-08T10:46:09+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/06/Technical-SEO-for-SaaS.svg  https://www.rocktherankings.com/wp-content/uploads/2022/06/image.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/image-1.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/wrong-canonical.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/wrong-canonical3.png  https://www.rocktherankings.com/wp-content/uploads/2022/06/internal-links.png https://www.rocktherankings.com/b2b-saas-content-strategy/ 2023-02-16T11:30:46+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/07/SaaS-Content-Strategy.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/SaaS-Funnel-1.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/SaaS-TopF.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-75.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-76.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-77.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-81.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-82.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-83.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-84.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-78.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-79.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-80.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/SaaS-MoTF.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-85.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-86.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-87.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-94.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-89.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-88.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/SaaS-BotF.svg  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-95.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-90.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-91.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-96.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-92.png  https://www.rocktherankings.com/wp-content/uploads/2022/07/image-93.png  https://www.rocktherankings.com/wp-content/uploads/2022/11/B2B-SaaS-Framework.png https://www.rocktherankings.com/saas-website-best-practices/ 2023-02-20T17:35:18+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/02/Website-Best-Practices-1.svg  https://www.rocktherankings.com/wp-content/uploads/2023/02/screenshot.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-11.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-1.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/wrike-example.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-15.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-3.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-4.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-2.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-10.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-6.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-12.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-14.png  https://www.rocktherankings.com/wp-content/uploads/2022/10/SaaS-Buyer-Awareness.svg  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-5.png https://www.rocktherankings.com/b2b-saas-blog-design/ 2023-02-24T17:47:13+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-23-at-17.30.37.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-23-at-17.24.43.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-24-at-13.44.52.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-24-at-13.46.56.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-24-at-13.43.07.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-17.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/blogpost.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/in-post-zendesk.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/gong.png https://www.rocktherankings.com/saas-international-seo/ 2023-02-26T14:40:37+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-26-at-15.37.10.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-26-at-15.17.16.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-23.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/Screenshot-2023-02-26-at-15.23.14.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-22.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/image-21.png https://www.rocktherankings.com/saas-seo-roi-calculator/ 2023-03-01T09:31:46+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/02/how-to-calculate-saas-seo-roi.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/Investment.svg https://www.rocktherankings.com/saas-integration-pages/ 2023-03-28T10:42:33+00:00  https://www.rocktherankings.com/wp-content/uploads/2022/12/Integration-Pages-1.svg  https://www.rocktherankings.com/wp-content/uploads/2023/01/Screenshot-2023-01-30-at-11.03.22.png  https://www.rocktherankings.com/wp-content/uploads/2023/01/Screenshot-2023-01-30-at-11.05.51.png  https://www.rocktherankings.com/wp-content/uploads/2023/01/Screenshot-2023-01-30-at-11.13.29.png  https://www.rocktherankings.com/wp-content/uploads/2023/01/Screenshot-2023-01-30-at-11.12.20.png  https://www.rocktherankings.com/wp-content/uploads/2023/01/image-1.png https://www.rocktherankings.com/saas-seo-audit/ 2023-03-28T12:07:36+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/01/Graph-Growth.svg  https://www.rocktherankings.com/wp-content/uploads/2023/03/image.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/image-1.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/image-2.png https://www.rocktherankings.com/saas-seo-kpis/ 2023-04-05T18:01:40+00:00  https://www.rocktherankings.com/wp-content/uploads/2023/03/image-3.png  https://www.rocktherankings.com/wp-content/uploads/2023/02/how-to-calculate-saas-seo-roi.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/image-3.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/image-4.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/ex-breakdown3.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/demo-example.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/goal2.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/rev-ex.png  https://www.rocktherankings.com/wp-content/uploads/2023/03/ROI.png

@dani

What you make out of all the above data ?

Isn't that the desired outcome? What are you expecting instead?

@dani

// If <a> tags exist ...
if ($links->length > 0)
{
    // For each <a> tag ...
    foreach ($links AS $link)
    {
        $link->setAttribute('class', 'link-style');
    }

Confused that setAttribute is being used here. I thought we used getAttribute. I thought setAttribute changed the item's attribute. Atleast, that is how it works on Ubot Studio (bot builder which I used from 2011-2017). http://ubotstudio.com.
Apart from that, yes, getting the required result now. Thanks.
But, I ain't letting you off that easily. Show me where you learnt this line from in the parser doc:

$doc->loadHTML($message, LIBXML_NOENT|LIBXML_COMPACT);
libxml_clear_errors();

The rest of your code, I found in the doc lastnight.
https://www.php.net/domdocument

@dani

Do you mind removing my confusion ?

@reverent jim

Do you mind removing my confusion which I asked Dani ?

@reverend jim

Do you mind removing my confusion which I asked Dani ?

Do you mind removing my confusion which I asked Dani ?

Hi,

Sorry about the long hiatus. Do you still have a question here?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.