rakibtg Posted March 30, 2013 Share Posted March 30, 2013 hi, i use PHP Simple HTML DOM Parser to get some data from another website. Big problem is while my server IP send a hundred requests in a second to source website and get blocked So, how i can use users own IP address while parsing a website? I know about using a proxy with simple php html dom parser but it's another big problem to me Please give me ideas. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/276318-how-to-use-users-own-ip-address-while-parsing-a-website/ Share on other sites More sharing options...
kicken Posted March 30, 2013 Share Posted March 30, 2013 You don't. If your server needs to grab the page and parse it, your server's IP is the one that will be used. There isn't any way to send a request under the end-users IP. If what you are doing is allowed then you won't get blocked. If it is not allowed then you shouldn't be doing it and getting blocked is what should happen. Quote Link to comment https://forums.phpfreaks.com/topic/276318-how-to-use-users-own-ip-address-while-parsing-a-website/#findComment-1421973 Share on other sites More sharing options...
Psycho Posted March 30, 2013 Share Posted March 30, 2013 (edited) Use JavaScript to request the external page from the client browser and then send the content to your server via AJAX to be processed and sent back to the client for output. Edited March 30, 2013 by Psycho Quote Link to comment https://forums.phpfreaks.com/topic/276318-how-to-use-users-own-ip-address-while-parsing-a-website/#findComment-1421979 Share on other sites More sharing options...
rakibtg Posted March 31, 2013 Author Share Posted March 31, 2013 (edited) @kicken its a online summary generator tool.@Psycho good idea... seems promising please tell me more about the process if possible... cause i know little about this stuff Edited March 31, 2013 by rakibtg Quote Link to comment https://forums.phpfreaks.com/topic/276318-how-to-use-users-own-ip-address-while-parsing-a-website/#findComment-1422058 Share on other sites More sharing options...
jcbones Posted March 31, 2013 Share Posted March 31, 2013 It doesn't matter what kind of site it is, or what it does. Kicken's statement is still valid, if you are allowed to scrape it, then you wouldn't get blocked for doing it. Read the TOS for the site, they may have an API that will do what you are asking, or they may ban it altogether. Quote Link to comment https://forums.phpfreaks.com/topic/276318-how-to-use-users-own-ip-address-while-parsing-a-website/#findComment-1422063 Share on other sites More sharing options...
kicken Posted March 31, 2013 Share Posted March 31, 2013 Javascript likely won't help you. By default, javascript is restricted to same origin requests only. Unless your target website(s) specifically allow a cross-origin request, the browser will prevent your code from making such requests. Quote Link to comment https://forums.phpfreaks.com/topic/276318-how-to-use-users-own-ip-address-while-parsing-a-website/#findComment-1422064 Share on other sites More sharing options...
rakibtg Posted March 31, 2013 Author Share Posted March 31, 2013 ow! Quote Link to comment https://forums.phpfreaks.com/topic/276318-how-to-use-users-own-ip-address-while-parsing-a-website/#findComment-1422097 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.