/    Sign up×
Community /Pin to ProfileBookmark

How to find a hotlink between Hong Kong and Kuala Lumpur?

Referrng to following link, I would like to find a hotlink between Hong Kong and Kuala Lumpur in Ecomony class, does anyone have any suggestions based on the source coding?

Thanks in advance for any suggestions

[url]http://www.malaysiaairlines.com/hk/en/deals/deals-of-the-day.html[/url]

to post a comment
Full-stack Developer

10 Comments(s)

Copy linkTweet thisAlerts:
@oem7110authorMar 24.2013 — Does anyone have any suggestions?

Thanks in advance for any suggestions
Copy linkTweet thisAlerts:
@jedaisoulMar 28.2013 — What is a "hotlink" in the context of travelling from HK to KL? And what does source code have to do with it?
Copy linkTweet thisAlerts:
@oem7110authorMar 28.2013 — I would like to check price between Hong Kong and Kuala Lumpur in Ecomony class everyday, but it requires to input locations for input selections. After I select locations and class and click search, it used method="post" instead of get, I would like to know whether it is possible to replicate this action using a single URL or not, so I don't need to select the locations and class everyday for checking price. If the web page used method="get", then it would be easy to replicate this action, since all locations and class will be add to the parameter of URL.

Do you have any suggestions?

Thanks in advance for any suggestions
Copy linkTweet thisAlerts:
@jedaisoulMar 29.2013 — It is possible to dump the post parameters, using PHP or JavaScript. That would allow you to inspect the parameter names and content. Then you could write your own front-end pre-setting the locations. So, yes, it is possible.

On reflection you might not even need to dump the parameters. If you save the web page locally (all major browsers have this facility) you could inspect the web page for the location input, and pre-set it. That might be easier. However, there could be a problem with retaining control. Such a web site is most likely to have extensive server functionality that is not apparent from the web page delivered to the client. But you can try...

A further thought... If the web site initially takes GET parameters then POST, it may be possible to pass the GET parameters anyway. It depends on how the arbitration between GET and POST parameters has been written. So you could try setting up an icon to launch the web page with the locations set in the GET parameters, and see what happens...

Good luck!
Copy linkTweet thisAlerts:
@oem7110authorMar 30.2013 — "It is possible to dump the post parameters, using PHP or JavaScript. That would allow you to inspect the parameter names and content. Then you could write your own front-end pre-setting the locations. So, yes, it is possible. "[/QUOTE]

It is too difficult to achieve without understanding PHP or JavaScript, furthermore, it may require to install server to perform this task.

... If you save the web page locally (all major browsers have this facility) you could inspect the web page for the location input, and pre-set it. That might be easier. However, there could be a problem with retaining control. Such a web site is most likely to have extensive server functionality that is not apparent from the web page delivered to the client. But you can try...[/QUOTE]

I try that it does not work, because the parameter cannot be saved using this approach.

... If the web site initially takes GET parameters then POST, it may be possible to pass the GET parameters anyway. It depends on how the arbitration between GET and POST parameters has been written. So you could try setting up an icon to launch the web page with the locations set in the GET parameters, and see what happens...[/QUOTE]

It seems impossible to guess parameters for GET.

Does anyone have any suggestions?

Thanks you very much for any suggestions
Copy linkTweet thisAlerts:
@jedaisoulMar 31.2013 — 
It is too difficult to achieve without understanding PHP or JavaScript, furthermore, it may require to install server to perform this task.
[/QUOTE]

But you asked if it were possible, not if it were easy. ?


I try that it does not work, because the parameter cannot be saved using this approach.
[/QUOTE]

I meant that the parameter name and content should be apparent from the form control. I.e. There should be SELECT tags in the HTML that take the flight departure and destination airports. I'll have a look at it.


It seems impossible to guess parameters for GET.
[/QUOTE]

You indicated that the site switched to POST parameters AFTER the source and destination were input. If so the parameters should be visible in the URL.
Copy linkTweet thisAlerts:
@jedaisoulMar 31.2013 — I've had a look at the source code and the parameters you want are:

ddlOrigin=HKG

ddlDestination=KUL

ddlCabinClass=1

However, I've tried passing these to the page as GET parameters, with no joy. So it seems that the only way to pre set them is to download and amend the source code:

  • - Open the web page and save it using the browser's facility to save the source code.


  • - Open the downloads folder and find "dealoftheday.htm" (the source code), and open it with a text editor (NOT a word processor). Then:


  • - Find:

    <label>I'm leaving from</label>

    <select tabindex="1" name="ddlOrigin" id="ddlOrigin">

    <option value="">Please select a Departure City</option>


  • - Scroll down to:

    <option value="HKG ">Hong Kong</option>


  • amend to:

    <option selected="selected" value="HKG ">Hong Kong</option>

  • - Find:

    <p><label>I'm going to</label>

    <select tabindex="2" name="ddlDestination" id="ddlDestination">

    <option value="">Please select an Arrival City</option>


  • - Scroll down to:

    <option value="KUL ">Kuala Lumpur</option>


  • amend to:

    <option selected="selected" value="KUL ">Kuala Lumpur</option>

  • - Find:

    <p><label>Cabin</label>

    <select tabindex="5" name="ddlCabinClass" id="ddlCabinClass">

    <option selected="selected" value="">Please select</option>

    <option value="1">Economy Class</option>

    <option value="2">Business Class</option>

    <option value="3">First Class</option>

    </select>


  • amend:

    <option selected="selected" value="">Please select</option>

    <option value="1">Economy Class</option>

    to:

    <option value="">Please select</option>

    <option selected="selected" value="1">Economy Class</option>

  • - Save the amended file, then click on the HTML file, and it will launch with the Origin, Destination and Cabin Class pre set. Voila!
  • Copy linkTweet thisAlerts:
    @oem7110authorMar 31.2013 — I have amended the file as you described, but when I click search, it does not connection to server.

    Do you have any suggestions?

    Thanks you very much for any suggestions

    Amended html file

    http://sdrv.ms/1774wjQ
    Copy linkTweet thisAlerts:
    @jedaisoulMar 31.2013 — Sorry, that's my ideas exhausted. At least I tried.
    Copy linkTweet thisAlerts:
    @oem7110authorMar 31.2013 — I am very appreciated your efforts.

    Thanks you very much for any suggestions
    ×

    Success!

    Help @oem7110 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.17,
    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,
    )...