Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP mehrere IPs

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe eine rootserver mit mehreren IPs.

kann ich php irgendwie mitteilen, von welcher IP z.b. ein fopen etc rausgehen soll?

Kann man das evtl auch dynamisch machen? Also das man selber im Script sagen soll, das dieses fopen von ip x.x.x.2 rausgehen soll und ein anderes dann vonn x.x.x.3?

Grüße,

Funfare

Ich hatte die Problematik auch einmal, allerdings damals keinen Zwang das zu lösen.

Ich glaube es ist am ehesten dadurch machbar, dem Apache für verschiedene Virtualhosts verschiedene IP-Adressen zuzuweisen. Dann kannst Du auch (z. B. über verschiedene Subdomains im DNS, also ip1.deineseite.de , ip2.deineseite.de , etc.) die Anfragen koordinieren. Für tiefgehenderes empfehle ich Dir das Thema "Load Balancing" (bsp. Load Balancing apache - Netmoo ) - Wie gesagt, kenne mich aber auch nur rudimentär mit der Thematik aus.

Hoffe geholfen zu haben

Manu vom Netmoo-Team

Hallo Funfare,

ich verstehe die Problematik und kann dir Spontan für fopen keine Antwort geben.

Wenn cURL eine Alternative für deine Anforderung ist, kannst du hier mit der Option CURLOPT_INTERFACE bestimmen, an welches Interface (oder IP, auch wenn der Name es nicht direkt vermuten lässt) er sich binden soll. Beschreibung gibt es hier: PHP: curl_setopt - Manual

Liebe Grüße

Kiera

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.