grantp22 Posted August 18, 2010 Share Posted August 18, 2010 I have script on my web hosts server built into pages that will be offered to the public, eg: index.php will have some script amongst the html, this script calls other webpages on the net eg: wiki.org Now my question is, when that script runs when somebody accesses that page, will the website eg: wiki.org record the users browser info and ip who called my index page or will it record the webhosts server details as the one making the requests? Quote Link to comment https://forums.phpfreaks.com/topic/211048-page-requests-from-parsed-php-pages/ Share on other sites More sharing options...
Adam Posted August 18, 2010 Share Posted August 18, 2010 The server's - however if you're using cURL you can pass your own user agent: curl_setopt($ch, CURLOPT_USERAGENT, 'user agent here'); Quote Link to comment https://forums.phpfreaks.com/topic/211048-page-requests-from-parsed-php-pages/#findComment-1100661 Share on other sites More sharing options...
grantp22 Posted August 18, 2010 Author Share Posted August 18, 2010 Hi MrAdam or anybody else who can help, I am basicly scanning table data on another website, it is working perfectly using simple_html_dom as seen in the simplified example below! include('simple_html_dom.php'); // $startpoint=1;//this allows you to pick the td to start at $endpoint=20;//this allows you to pick the td to end at // $i=1; $mycount=1; // $html = file_get_html('http://www.somewebsite.com/tabledata); foreach($html->find('tr') as $tr) { if($i >= $startpoint && $i <= $endpoint){ foreach($tr->find('td.datacell') as $td){ $val1 = 'val1_' . ($i-$startpoint); $val2 = 'val2_' . $mycount; $myarray[$val1][$val2] = $td->innertext; if($mycount==10){ $mycount=1; }else{ $mycount++; } } } $i++; } // $newcount = newcount($myarray); // $i = 1; //Add table rows and cells while($i <= $count) { echo '<tr>'; echo '<td>'.$myarray['val1_'.$i]['val2_1'].'</td>'; echo '<td>'.$myarray['val1_'.$i]['val2_2'].'</td>'; echo '<td>'.$myarray['val1_'.$i]['val2_3'].'</td>'; echo '</tr>'; } Now I need an example of how to change my code using curl to hide my server details and make it appear as though the request is being made from the users machine or some other random details. I knew that curl was the answer, and I have never used it before, and also it's just there is not much info about using these functions to do this. Can anybody tell me how to do this or at least point me to a tutorial of some kind Thanks Quote Link to comment https://forums.phpfreaks.com/topic/211048-page-requests-from-parsed-php-pages/#findComment-1100683 Share on other sites More sharing options...
Adam Posted August 18, 2010 Share Posted August 18, 2010 Now I need an example of how to change my code using curl to hide my server details and make it appear as though the request is being made from the users machine or some other random details. Why exactly do you want to hide your server's details? I knew that curl was the answer, and I have never used it before, and also it's just there is not much info about using these functions to do this. Can anybody tell me how to do this or at least point me to a tutorial of some kind There's plenty of information about each function - with examples - in the manual. Although you're not going to be able to spoof the IP address with cURL.. Quote Link to comment https://forums.phpfreaks.com/topic/211048-page-requests-from-parsed-php-pages/#findComment-1100697 Share on other sites More sharing options...
grantp22 Posted August 18, 2010 Author Share Posted August 18, 2010 Mr Adams, I can if I go through a proxy and the reason for spoofing is that I don't want my servers details being recorded period! Quote Link to comment https://forums.phpfreaks.com/topic/211048-page-requests-from-parsed-php-pages/#findComment-1100713 Share on other sites More sharing options...
Adam Posted August 18, 2010 Share Posted August 18, 2010 That's not really spoofing your IP though, and you still have the same kind of problems using a proxy. There's security risks if that's what your original worry was over revealing your IP, or if it's just to keep yourself anonymous from the server for whatever reason the proxy you use has your IP address. Quote Link to comment https://forums.phpfreaks.com/topic/211048-page-requests-from-parsed-php-pages/#findComment-1100727 Share on other sites More sharing options...
grantp22 Posted August 18, 2010 Author Share Posted August 18, 2010 I know, but who is really going to go to each proxy service and request your ip, if they even give it out in the first place, because they guarentee anonymity. Lets just say this makes it more difficult for anyone wanting to know where the page requests are coming from. My reason for this is to remain anonymous, no malicious intents! Thanks for pointer Quote Link to comment https://forums.phpfreaks.com/topic/211048-page-requests-from-parsed-php-pages/#findComment-1100737 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.