Javascript HTML parser

Posted on 2007-10-19
Last Modified: 2013-11-19
I need to build into my php application some javascript elements. My application check a given webpage for some information - lets suppose we have to check if there is a 'special link' on a 'special webpage'. I know how to parse this webpage using php and to check for the special link on it. The problem is that if I use a server side platform like php the 'special website' will know that I always do checking from the same IP address and my website will get banned.

So I need a client side platform as javascript. I want to implement a javascript function into my website. If a user uses my website to do 'the checking' he will open my check webpage. When the check page loads complete a javascript function has to start automatically. This javascript function has to make the checking process (on behalf of the user IP address) and inform the user about the result.

The most important is the checked special webpage to do not know about my website at all.

Is it possible to do this?

Thank you.

Question by:pmarkov
    LVL 1

    Accepted Solution

    Cross domain security will not allow you to do such thing with client script... This would cause security issue... This could only be possible if the pages are on the same domain as yours (or same server if you like) and that is fairly easy to do with Ajax components.
    LVL 7

    Expert Comment

    Your best bet would be to use cURL to change the referer for each connection but as far as IP adress changing each time there is not a way to do that. You could get cheap php hosting and have your script run from there and have your website access the remote script then if anything happend it would be easy to have cheap backup servers in place to redirect your script to. Say you had 3 very cheap hosts for your parsing script and your script started with server 1 and moved down the list if you could not get the results returned from the first server and send you an email there was a problem with the results being returned from the first server but there is no way to hide the IP thats going to parse the page. Even with a heavy traffic site we have used parsing for remote price checking and have never had a problem with a site banning us so you may very likley not have a problem.

    Hope that helps :)
    LVL 2

    Expert Comment

    use your php to go through a free proxy to request the page
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now