1

To make this short, I will show what I need exactly. Here is the site, it shows some info about game stats once entered username and region.

http://riot.control-c.ir/
http://riot.control-c.ir/Summoner/EUW/26233693

How can I make remote submitting these forms to parse pages for different users?

1

1 Answer 1

2

THis can be done by copying the same http request that the remote form makes when it submits.

See the following form,

<form action="submit.php" method="post">
<input type=text name="username" />
<input type=text name="password" />
<input type=submit name="submit" value="Submit"/>
</form>

When this form is submitted there is an http request sent to submit.php on the remote host with post method. and in the body these fields reside.

username=MYUSERNAME&password=MYPASSWORD&submit=Submit

The http request looks like

POST submit.php
Host: remotehost.com
Accpet: */*
Content-Type: x-www-form-urlencoded
Content-Length: 43

username=MYUSERNAME&password=MYPASSWORD&submit=Submit

All you have to do is mimic this request.

Curl is a popular library for this task.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.