वेब कॅप्चर आणि रूपांतरित करण्यासाठी साधने

फॉर्मवर कसे पोस्ट करावे आणि परिणामाचा स्क्रीनशॉट कसा करावा?

फॉर्मवर पोस्ट करण्यासाठी तुम्हाला प्रथम पोस्ट केलेल्या फॉर्मची URL प्राप्त करणे आवश्यक आहे. हे करण्यासाठी, वेब पृष्ठाचा स्त्रोत बघून HTML फॉर्म मिळवा, जे असे काहीतरी दिसू शकते.

<form action="http://www.example.com/login.php" method="post">
   <div class="FormRow">
      <label>Username</label>
      <input type="text" name="username" data-gt-translate-attributes='[{"attribute":"value","format":"json"}]' value="">
   </div>
   <div class="FormRow">
      <label>Password</label>
      <input type="password" name="password" data-gt-translate-attributes='[{"attribute":"value","format":"json"}]' value="">
   </div>
   <input type="submit" class="submit" data-gt-translate-attributes='[{"attribute":"value","format":"json"}]' value="Login">
</form>

एकदा तुमच्याकडे फॉर्मची 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");
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");
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@3.5.2/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>

node.js मध्ये पोस्ट डेटा निर्दिष्ट करताना तुम्ही प्रत्येक पोस्ट व्हेरिएबलचे नाव आणि मूल्य URL एन्कोड केले पाहिजे.

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 = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret");

$options = GrabzItImageOptions->new();
$options->AddPostParameter("username", "bob");
$options->AddPostParameter("password", "pass");

$grabzIt->URLToImage("http://www.example.com/login.php", $options);
$grabzIt->Save("http://www.mywebsite.com/handler.pl");
$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?key=Sign in to view your Application Key&post=username%3Dbob%26password%3Dpass&format=jpg&url=http%3A%2F%2Fwww.example.com%2Flogin.php
grabzIt = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")

options = GrabzIt::ImageOptions.new()
options.add_post_parameter("username", "bob");
options.add_post_parameter("password", "pass");

grabzIt.url_to_image("http://www.example.com/login.php", options)
grabzIt.save("http://www.mywebsite.com/handler/index")