tobiaskluge / phpsitemapng

phpSitemapNG php based google sitemaps generator
GNU General Public License v3.0
16 stars 13 forks source link

Not working for HTTPS #3

Closed Scott-G closed 2 years ago

Scott-G commented 4 years ago

Hi

Sitemap works fine on HTTP buit not for HTTPS.

I have tried setting the website and scan URLs to HTTPS. The script seems to run OK but returns

Info: Crawling website now... Found 0 files

I have also tried setting the the site to 301 redirect from HTTP to HTTPS but this has the same result.

I realise this repo is old but I cannot fine another script that meets my needs as well as this one.

Osminogg commented 4 years ago

I had a similar problem, I rummaged through the code and found an error - in file inc/classes/Crawler.class.php is used fsockopen (on line 451). For https url must start with ssl:// .

$fp = fsockopen(($url_scheme == 'https' ? 'ssl://' : '').$url_host, $url_port, $errno, $errstr, $this->timeout);

I hope this helps someone.

tobiaskluge commented 2 years ago

Fixed in commit #0d5415402120434c5eac02f51275f9e46818fd5a