spatie / mixed-content-scanner

Scan a HTTPS-site for mixed content
https://spatie.be/open-source
MIT License
98 stars 16 forks source link

scanner return null #26

Closed 5433d closed 4 years ago

5433d commented 4 years ago

hi i am noob in php can help me scanner return null this is my controller `<?php namespace App\Http\Controllers; use App\CustomeClass\MixedContentLogger; use App\myClass\myClass; use Ixudra\Curl\Facades\Curl; use Spatie\MixedContentScanner\MixedContentScanner; class CheckSSLController extends Controller { //

public function CheckPadLock(){

   $url=\request('url');
    $logger = new MixedContentLogger();
    $scanner = new MixedContentScanner($logger);
    $res=$scanner->scan($url);
}

}`

and this is MixedContentLogger class `<?php namespace App\CustomeClass;

use Psr\Http\Message\UriInterface; use Spatie\MixedContentScanner\MixedContent; use Spatie\MixedContentScanner\MixedContentObserver;

class MixedContentLogger extends MixedContentObserver { /**

}

/**

}

/**

} } `

tonsit commented 4 years ago

The scanner object will not return anything from the scan function. What you need to do is add some logic into your MixedContentLogger functions so that they can react to mixed content being found. Those are meant to be placeholders and require you to supplement the logic. I would suggest taking a look at https://github.com/tonsit/mixed-content-scanner-cli/blob/master/src/MixedContentLogger.php for some ideas of what these functions should do.

spatie-bot commented 4 years ago

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.