0

i want to run a php server side code, on apache. are there any servers suppliers which enables your code opens ports using diffrent ips?

for example for 5 minutes my code will use this ip:

213.168.0.17

and after that it will switch the ip and will use this one (e.g):

213.198.0.10

and then after 5 minutes to switch for pseudo random ip again and agian.

i don't want my code to use the same ip all the time.

thanks

0x90
  • 39,472
  • 36
  • 165
  • 245
  • 1
    Highly unlikely. There's few enough available IPv4 addresses out there to waste them on a service like this. As well, most hosting services don't have multiple IP blocks that'd allow the kind of variety you seem to require. They'll have a single contiguous block. – Marc B Dec 28 '11 at 19:16
  • 4
    Why on earth would you want that? How would anybody ever be able to visit your site? – Mark Baker Dec 28 '11 at 19:17
  • This question made me think of Untraceable. – animuson Dec 28 '11 at 19:18
  • lol, i'll explain. i want that for each visit in my site, to make one query to some other web site which limits the number of queries the same ip can do in a short timing, i think if there any solution as i asked for that would be great isn't it ? – 0x90 Dec 28 '11 at 19:22
  • 1
    Then you should hit the other site via a cronjob and cache the result locally. – Maerlyn Dec 28 '11 at 19:23
  • 5
    I think the appropriate thing to do would be to buy a license to access this site legitimately. – jprofitt Dec 28 '11 at 19:24
  • 1
    There are some hosts that let you use several different IPs (there are legitimate uses) for the same server, but what your talking about really requires a proxying service. – MrGlass Dec 28 '11 at 19:24
  • if there any host service which aggregates all the request from is costumers and then fork them, would do the work as well, style of proxy server. – 0x90 Dec 28 '11 at 19:28

2 Answers2

2

I am answering this with the assumption that you will use this information in good faith.

If you are accessing a resource on another website, I suggest that you use cURL and harness its proxy option. You may check out the CURLOPT_PROXY option (curl_setopt) for this.

All you have to do is gather a list of 'working' proxy servers, put them in an array or a database and pick a certain IP to use for the certain time range.

You might also find this StackOverflow question useful.

Community
  • 1
  • 1
Mikko
  • 602
  • 4
  • 18
1

When using cURL, you can use curl_setopt($c, CURLOPT_INTERFACE, '1.2.3.4') to specify the outgoing IP address. However, there's no way to do this for all outgoing requests from a server - you really have to specify this for each cURL request, and file_get_contents won't give you this kind of control.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105