PHP code to find how many pages an external link might have

Viewed 50

I need to find a way to know how many pages an external link might have depending on the products i choose to see per page.

eg:

This link might have 36 products and I'm asking to see 5 products per page:

https://externalsite.com/cat/dvd-cat/sub-cat/?per_page=5

When I click on page two, I get the link this way:

https://externalsite.com/cat/dvd-cat/sub-cat/page/2/?per_page=5

What I need to find is how many pages the first URL will have in PHP

0 Answers
Related