hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : PHP Question, specifying server ip
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

PHP Question, specifying server ip

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-18-2005, 03:09 PM
k2host k2host is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Location: Portland, OR
Posts: 80

PHP Question, specifying server ip


Is it possible to tell PHP which IP to use for actions such as fopen() and curl()?

For example, the script is running a server with 8 ips. The script (which is run from the command line) connects to a remote server and downloads specific files. If I run a second instance of the script, it will attempt to connect to the server using the same local IP of the first instance, but the remote server only allows 1 connection per IP. Is there a way I can run multiple instances, each connecting using a different local IP?

Thanks,

Kurt

Reply With Quote


Sponsored Links
  #2  
Old 08-18-2005, 04:53 PM
hiryuu hiryuu is offline
Web Hosting Master
 
Join Date: Jan 2003
Posts: 1,715
Not with those, no. If you wan to use sockets directly, there's socket_bind(). Perhaps you should use file locking, or something similar, to prevent multiple runs from hitting that code at the same time.

__________________
Game Servers are the next hot market!
Slim margins, heavy support, fickle customers, and moronic suppliers!
Start your own today!

Reply With Quote
  #3  
Old 08-18-2005, 05:27 PM
PerfTuner PerfTuner is offline
Web Hosting Guru
 
Join Date: Jul 2005
Posts: 256
Check CURLOPT_INTERFACE option in curl_setopt manual.
http://www.php.net/manual/en/function.curl-setopt.php

Reply With Quote
Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host OrcsWeb Offers Support for Windows Server 2012 Web Hosting News 2012-08-24 11:08:35
Java-Based Web Server Resin Claims it Outperforms NGINX Web Server in Benchmark Tests Web Hosting News 2012-08-22 10:59:49
WHIR TV: Backup Software Firm R1Soft Discusses Brand Transition to Idera Whir Tv 2012-08-27 14:08:15
Web Host 1&1 Enhances Dedicated Server Line with 32 Core, 64 GB RAM Server Web Hosting News 2011-12-20 15:30:05
DiscountASP.NET Launches Free Beta for Microsoft SQL Server 2012 Hosting Web Hosting News 2011-12-13 22:02:03


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?