ShivaGupta Posted June 17, 2013 Share Posted June 17, 2013 Is it possible to send a different IP address using CURL when you make requests to a server? Link to comment https://forums.phpfreaks.com/topic/279259-is-it-possible-to-send-a-different-ip-address-using-curl-when-you-make-requests-to-a-server/ Share on other sites More sharing options...
trq Posted June 17, 2013 Share Posted June 17, 2013 What exactly is the point? You would never receive the response. Link to comment https://forums.phpfreaks.com/topic/279259-is-it-possible-to-send-a-different-ip-address-using-curl-when-you-make-requests-to-a-server/#findComment-1436370 Share on other sites More sharing options...
ShivaGupta Posted June 17, 2013 Author Share Posted June 17, 2013 What exactly is the point? You would never receive the response. the point is retrive visiter ip using this code. then $user_ip = IP address using CURL when you make requests to a server.........because server blocked my host resion many request s frm my ip so my ip get blocked.sory for my bad english.. function getUserIP() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; } return $ip; } $user_ip = getUserIP(); Link to comment https://forums.phpfreaks.com/topic/279259-is-it-possible-to-send-a-different-ip-address-using-curl-when-you-make-requests-to-a-server/#findComment-1436383 Share on other sites More sharing options...
kicken Posted June 17, 2013 Share Posted June 17, 2013 No, it is not possible to do what you want. You can send the user's IP as additional data in the request, but you can't make it 'originate' from that IP. If your server is blocked, most likely you're doing something you are not supposed to be doing so naturally they are going to block you. Link to comment https://forums.phpfreaks.com/topic/279259-is-it-possible-to-send-a-different-ip-address-using-curl-when-you-make-requests-to-a-server/#findComment-1436391 Share on other sites More sharing options...
ShivaGupta Posted June 17, 2013 Author Share Posted June 17, 2013 No, it is not possible to do what you want. You can send the user's IP as additional data in the request, but you can't make it 'originate' from that IP. If your server is blocked, most likely you're doing something you are not supposed to be doing so naturally they are going to block you. so i am sad. is there any alternative way of spoofing your IP address using PHP? Link to comment https://forums.phpfreaks.com/topic/279259-is-it-possible-to-send-a-different-ip-address-using-curl-when-you-make-requests-to-a-server/#findComment-1436395 Share on other sites More sharing options...
kicken Posted June 17, 2013 Share Posted June 17, 2013 so i am sad. is there any alternative way of spoofing your IP address using PHP? Even if you could, as has been mentioned, you would not get the response so it wouldn't really do you any good. Link to comment https://forums.phpfreaks.com/topic/279259-is-it-possible-to-send-a-different-ip-address-using-curl-when-you-make-requests-to-a-server/#findComment-1436409 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.