ਕਿਸੇ ਫਾਰਮ ਤੇ ਪੋਸਟ ਕਰਨ ਲਈ ਤੁਹਾਨੂੰ ਪਹਿਲਾਂ ਉਸ ਫਾਰਮ ਦਾ URL ਪ੍ਰਾਪਤ ਕਰਨਾ ਪਵੇਗਾ ਜੋ ਪੋਸਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ. ਅਜਿਹਾ ਕਰਨ ਲਈ ਵੈਬ ਪੇਜ ਦੇ ਸਰੋਤ ਨੂੰ ਵੇਖਦਿਆਂ ਫਾਰਮ ਨੂੰ ਐਚਟੀਐਮਲ ਪ੍ਰਾਪਤ ਕਰੋ, ਜੋ ਇਸ ਤਰ੍ਹਾਂ ਦੀ ਲੱਗ ਸਕਦੀ ਹੈ.
ਇੱਕ ਵਾਰ ਜਦੋਂ ਤੁਹਾਡੇ ਕੋਲ ਫਾਰਮ ਦਾ URL ਹੈ ਤਾਂ ਤੁਹਾਨੂੰ ਫਾਰਮ ਦੇ ਹਰੇਕ ਇਨਪੁਟਸ ਦਾ ਨਾਮ ਅਤੇ ਮੁੱਲ ਦਰਸਾਉਣ ਦੀ ਜ਼ਰੂਰਤ ਹੈ ਤਾਂ ਜੋ ਪੋਸਟ ਨੂੰ ਟੀਚੇ ਦੀ ਵੈੱਬਸਾਈਟ ਦੁਆਰਾ ਰੱਦ ਨਹੀਂ ਕੀਤਾ ਜਾਏਗਾ. ਇਸਦੀ ਇੱਕ ਉਦਾਹਰਣ ਹੇਠਾਂ ਦਰਸਾਈ ਗਈ ਹੈ.
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
ImageOptions options = new ImageOptions();
options.AddPostParameter("username", "bob");
options.AddPostParameter("password", "pass");
grabzIt.URLToImage("http://www.example.com/login.php", options);
grabzIt.Save("http://www.mywebsite.com/handler.ashx");
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@3.4.8/grabzit.min.js"></script>
<script>
GrabzIt("Sign in to view your Application Key").AddPostVariable("username", "bob").AddPostVariable("password", "pass")
.ConvertURL("http://www.example.com/login.php").Create();
</script>
ਜਦੋਂ ਨੋਡ.ਜੇਜ਼ ਵਿੱਚ ਪੋਸਟ ਡੇਟਾ ਨਿਰਧਾਰਤ ਕਰਦੇ ਹੋ ਤਾਂ ਤੁਹਾਨੂੰ ਹਰੇਕ ਪੋਸਟ ਵੇਰੀਏਬਲ ਦੇ ਨਾਮ ਅਤੇ ਮੁੱਲ ਨੂੰ ਯੂਆਰਐਲ ਦੇਣਾ ਚਾਹੀਦਾ ਹੈ.
var grabzit = require('grabzit');
var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");
client.url_to_image("http://www.example.com/login.php", {"postData":"username=bob&password=pass"});
client.save("http://www.example.com/handler", function (error, id){
if (error != null){
throw error;
}
});
$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
$options = new \GrabzIt\GrabzItImageOptions();
$options->AddPostParameter("username", "bob");
$options->AddPostParameter("password", "pass");
$grabzIt->URLToImage("http://www.example.com/login.php", $options);
$grabzIt->Save("http://www.mywebsite.com/handler.php");
grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
options = GrabzItImageOptions.GrabzItImageOptions()
options.AddPostParameter("username", "bob");
options.AddPostParameter("password", "pass");
grabzIt.URLToImage("http://www.example.com/login.php", options)
grabzIt.Save("http://www.mywebsite.com/handler.py")
ਬੇਨਤੀਆਂ ਕਰਦੇ ਸਮੇਂ ਯਾਦ ਰੱਖੋ ਕਿ ਇਹ ਯਕੀਨੀ ਬਣਾਓ ਸਾਰੇ ਪੈਰਾਮੀਟਰ ਦੇ ਮੁੱਲ URL ਨੂੰ ਏਨਕੋਡ ਕੀਤੇ ਹਨ. ਯਾਦ ਰੱਖੋ ਕਿ ਹਰੇਕ POST ਨਾਮ ਅਤੇ ਮੁੱਲ ਨੂੰ ਪਹਿਲਾਂ URL ਨੂੰ ਏਨਕੋਡ ਕਰਨਾ ਹੋਵੇਗਾ.
https://api.grabz.it/services/convert.ashx?key=Sign in to view your Application Key&post=username%3Dbob%26password%3Dpass&format=jpg&url=http%3A%2F%2Fwww.example.com%2Flogin.php