?
Solved

Javascript HTML parser

Posted on 2007-10-19
5
Medium Priority
?
1,122 Views
Last Modified: 2013-11-19
Hello,
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.

0
Comment
Question by:pmarkov
4 Comments
 
LVL 1

Accepted Solution

by:
ShaDowQC earned 2000 total points
ID: 20111413
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.
0
 
LVL 7

Expert Comment

by:gemdeals395
ID: 20111753
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 :)
0
 
LVL 2

Expert Comment

by:ll_jaxn
ID: 20112449
use your php to go through a free proxy to request the page
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20561841
Forced accept.

Computer101
EE Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

839 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