ਇੱਥੇ ਦੱਸਿਆ ਗਿਆ ਹੈਂਡਲਰ ਗਰੈਬਜ਼ਆਈਟੀ ਸਕ੍ਰੀਨ ਸ਼ਾਟ ਵੈਬ ਸੇਵਾ ਤੋਂ ਕਾਲਬੈਕ ਨੂੰ ਪ੍ਰਕਿਰਿਆ ਕਰਦਾ ਹੈ. ਇਸ ਹੈਂਡਲਰ ਦਾ URL ਨੂੰ GrabzIt ਵਿੱਚ ਦਿੱਤਾ ਗਿਆ ਹੈ callBackURL
ਦੇ ਪੈਰਾਮੀਟਰ Save ਵਿਧੀ
ਹਾਲਾਂਕਿ ਇਹ ਤਕਨੀਕ ਤਾਂ ਹੀ ਕੰਮ ਕਰੇਗੀ ਜੇ ਹੈਂਡਲਰ ਰਾਹੀਂ ਪਹੁੰਚਯੋਗ ਹੋਵੇ Intਅਰਨੇਟ
ਹੇਠ ਦਿੱਤੇ ਮਾਪਦੰਡ GET ਪੈਰਾਮੀਟਰਾਂ ਦੇ ਤੌਰ ਤੇ ਹੈਂਡਲਰ ਨੂੰ ਦਿੱਤੇ ਗਏ ਹਨ.
ਜੇ ਤੁਸੀਂ ਹੈਂਡਲਰ ਦੀ ਸਾਰੀ ਪਹੁੰਚ ਨੂੰ ਰੋਕਣਾ ਚਾਹੁੰਦੇ ਹੋ, ਗਰੈਬਜ਼ ਆਈਟ ਤੋਂ ਇਲਾਵਾ ਤਾਂ ਇਸ ਦੀ ਵਰਤੋਂ ਕਰੋ ਸੁਰੱਖਿਆ ਤਕਨੀਕ.
ਇਹ ਉਦਾਹਰਣ ਦਰਸਾਉਂਦੀ ਹੈ ਕਿ ਗਰੈਬਜ਼ਆਈਟੀ ਪੀਐਚਪੀ ਹੈਂਡਲਰ ਨੂੰ ਕਿਵੇਂ ਲਾਗੂ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ. ਇਹ ਗਰੈਬਜ਼ ਸੇਵਾ ਤੋਂ ਇਸ ਨੂੰ ਪਾਸ ਕੀਤੇ ਪੰਜ ਮਾਪਦੰਡਾਂ ਨੂੰ ਕੈਪਚਰ ਕਰਦਾ ਹੈ, ਜਿਸ ਵਿਚ ਸਕ੍ਰੀਨ ਸ਼ਾਟ ਦੀ ਵਿਲੱਖਣ ਆਈਡੀ ਵੀ ਸ਼ਾਮਲ ਹੈ ਜੋ GetResult ਵਿਧੀ
ਇਹ ਵਿਧੀ ਫਿਰ ਸਕ੍ਰੀਨਸ਼ਾਟ ਵਾਪਸ ਕਰਦੀ ਹੈ, ਜੋ ਕਿ saveਨਤੀਜੇ ਡਾਇਰੈਕਟਰੀ ਵਿੱਚ d. ਹਾਲਾਂਕਿ ਜੇ ਏ null
ਤੋਂ ਮੁੱਲ ਵਾਪਸ ਕਰ ਦਿੱਤਾ ਜਾਂਦਾ ਹੈ GetResult ਵਿਧੀ ਇਹ ਦਰਸਾਉਂਦੀ ਹੈ ਕਿ ਕੋਈ ਗਲਤੀ ਹੋਈ ਹੈ.
include("GrabzItClient.php"); // This PHP file handles the GrabzIt callback $message = $_GET["message"]; $customId = $_GET["customid"]; $id = $_GET["id"]; $filename = $_GET["filename"]; $format = $_GET["format"]; $targetError = $_GET["targeterror"]; // Custom id can be used to store user ids or whatever is needed for the later processing of the // resulting screenshot $grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")%>"); $result = $grabzIt->GetResult($id); if (!$result) { return; } // Ensure that the application has the correct rights for this directory. file_put_contents("results" . DIRECTORY_SEPARATOR . $filename, $result);