/    Sign up×
Community /Pin to ProfileBookmark

Figuring out what info a form sends to webpage

Hi,

im a webdevelopment noob and am not really developing a website or anything but am trying to write a program that sends info (like traveldate etc) to travelsites and evaluates the prices the sites show in return.

Now i started with this site:
[url]www.skyscanner.de[/url], whos source code tells me the used form uses a “post” method to send the entered data to the next site.

[code=html]<form action=”/r/Search/” class=”clearfix” id=”search-controls-form” [B]method=”post”[/B]> <div class=”row”>
<div class=”two-col-layout” id=”departure”>
<label for=”departure-input”>Von</label>
<input name=”departure-input” id=”departure-input” tabindex=”1″ type=”text” list=”departure-list” autocomplete=”off” placeholder=”Land, Stadt oder Flughafen eingeben”
autocorrect=”off” autocapitalize=”off” spellcheck=”false”>
<span id=”departure-input-helper” class=”input-helper”></span>
</div>
<span id=”controls-swap” title=”Klicken Sie hier, um den Abreise- und Ankunftsort zu tauschen.”>
<span class=”hidden”>Klicken Sie hier, um den Abreise- und Ankunftsort zu tauschen.</span>
</span>
<div class=”two-col-layout” id=”destination”>
<span id=”map-anchor”><a href=”/karte-fuer-billigfluege”>Karte</a></span>
<label for=”destination-input”>Nach</label>
<input name=”destination-input” id=”destination-input” tabindex=”2″ type=”text” list=”destination-list” autocomplete=”off” placeholder=”Land, Stadt oder Flughafen eingeben”
autocorrect=”off” autocapitalize=”off” spellcheck=”false”>
<span id=”destination-input-helper” class=”input-helper”></span>
<div id=”prefer-directs-toggle” class=”clearfix”>
<input type=”checkbox” tabindex=”3″ name=”prefer-directs” id=”prefer-directs-input”>
<label for=”prefer-directs-input”>Direktverbindung bevorzugt</label>
</div>
</div>
</div>
<div class=”row”>
<div id=”journey-details”>
<div id=”journey-type-toggle” class=”clearfix”>
<input type=”radio” tabindex=”4″ value=”1″ name=”journey-type” id=”journey-type-return” checked=”checked”>
<label for=”journey-type-return”>R&#252;ckreise</label>
<input type=”radio” tabindex=”4″ value=”0″ name=”journey-type” id=”journey-type-oneway”>
<label for=”journey-type-oneway”>Nur Hinreise</label>
</div>
<div id=”journey-date-container” class=”clearfix”>
<p class=”label”>Hinreise</p>
<div class=”journey-date”>
<label for=”departure-date-calendar” class=”hide”>Abreisedatum</label>
<input name=”departure-date-calendar” id=”departure-date-calendar” tabindex=”5″ class=”datepicker” autocomplete=”off” type=”text” placeholder=”Abreisedatum”>
<span id=”depart-date-desc” class=”label”></span>
</div>
<div class=”journey-date journey-date-return”>
<label for=”return-date-calendar” class=”hide”>R&#252;ckreisedatum</label>
<input name=”return-date-calendar” id=”return-date-calendar” class=”datepicker” tabindex=”6″ autocomplete=”off” type=”text” placeholder=”R&#252;ckreisedatum”>
<span id=”return-date-desc” class=”label”></span>
</div>
</div>
</div>
<div id=”cabin-class-passenger-info-container” class=”clearfix”>
<div id=”passenger-container” class=”clearfix”>
<div id=”passenger-number-container” class=”clearfix”>
<p class=”label”>Reisende</p>
<div class=”passenger-info”>
<span class=”passenger-adult”><input type=”number” pattern=”d+” tabindex=”7″ maxlength=”1″ value=”1″ id=”passenger-info-adult”></span>
<label for=”passenger-info-adult”>12+ Jahre</label>
</div>
<div class=”passenger-info”>
<span class=”passenger-child”><input type=”number” pattern=”d+” tabindex=”8″ maxlength=”1″ value=”0″ id=”passenger-info-child”></span>
<label for=”passenger-info-child”>unter 12</label>
</div>
<div class=”passenger-info passenger-info-last”>
<span class=”passenger-infant”><input type=”number” pattern=”d+” tabindex=”9″ maxlength=”1″ value=”0″ id=”passenger-info-infant”></span>
<label for=”passenger-info-infant”>unter 2</label>
</div>
</div>
</div>
<div id=”cabin-class-container” class=”clearfix”>
<p class=”label”>Kabinenklasse</p>
<select id=”cabin-class” tabindex=”10″>
<option value=”Economy”>Economy</option>
<option value=”PremiumEconomy”>Premium Economy</option>
<option value=”Business”>Business Class</option>
<option value=”First”>First Class</option>
</select>
</div>
</div>
</div>
<div id=”search-ancillaries” class=”row last clearfix”>
<ul id=”search-compare-units” class=”compare-units-container icon-free-list clearfix hide”>
<li class=”label”>Preis-Check (neue Fenster)</li>
<li class=”template”>
<input id=”compare-unit-key” class=”compare-unit-checkbox compare-unit-key” tabindex=”11″ type=”checkbox”>
<label for=”compare-unit-key”>labelValue</label>
</li>
</ul>
<div id=”search-controls-container”>
<button tabindex=”20″ type=”submit” id=”search-controls-button” class=”large-button”>
<span class=”button-text”>Suchen</span>
<span class=”button-spinner”>&nbsp;</span>
</button>
</div>
</div>
</form>[/code]

I tried using fiddler 2, firefoxes own network analysis tools and firebug to find out what info the post-command actually sends but i only see “get” requests once i hit the “submit” button.
How is this possible? and how can i find out what infos to send?

Thanks for any help ?

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@Error404Apr 01.2014 — The purpose of using the post method is to prevent the information from being readily accessible to others. The get method will show up in the URL and can be easily read. For example, if you go to a particular post on these forums, there will be a unique ID and will show up in the URL (get method). On the other hand, if you're doing online purchases, you're not going to see your information in the URL (post method).

I suppose the biggest question to me is, if you want to see the prices, why not scrape the website (i.e. send the actual information, let it be processed, grab the results and show them to the user)?
Copy linkTweet thisAlerts:
@InternetNoobauthorApr 02.2014 — The purpose of using the post method is to prevent the information from being readily accessible to others. The get method will show up in the URL and can be easily read. For example, if you go to a particular post on these forums, there will be a unique ID and will show up in the URL (get method). On the other hand, if you're doing online purchases, you're not going to see your information in the URL (post method).

I suppose the biggest question to me is, if you want to see the prices, why not scrape the website (i.e. send the actual information, let it be processed, grab the results and show them to the user)?[/QUOTE]


I understand the reason for the use of the post method, but i cannot see it being used when i use analyzertool such as fiddler 2 or firebug. Which makes me wonder why thats the case.

I tried to just fill the form and asked about it in a different forum where i was told it would be smarter to just fetch the "post"-info send to the server and send that message directly (instead of filling the form and submitting it) and then grab the results.

My question remains unanswered: Why does the method state "post" yet i cannot see a post-message being send to the server?

Thank you for your help anyway ?
Copy linkTweet thisAlerts:
@Error404Apr 03.2014 — I still don't understand the benefit of doing it the way you described but Firebug will not be able to do that for you. Instead, try out TamperData. I haven't used it but from the description, it might let you achieve what you're after.
Copy linkTweet thisAlerts:
@InternetNoobauthorApr 04.2014 — I still don't understand the benefit of doing it the way you described but Firebug will not be able to do that for you. Instead, try out TamperData. I haven't used it but from the description, it might let you achieve what you're after.[/QUOTE]

Thanks, but this does not show me any "post" either.

How can this be? The html code clearly shows a postmethod yet i cannot detect a postmethod being sent?!
×

Success!

Help @InternetNoob spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...