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] fopen URL

Empfohlene Antworten

Hallo zusammen,

ich habe ein Script, indem ich via fopen('http://localhost/index.php?a=b&d=e') die Inhalte eines anderen Scripts auslese und via HTML Email verschicke.

Nun gibt es leider einige Webspaces, bei denen der Webserver fopen mit URL nicht gestattet. Könnte ich die Ausgabe eines anderen PHP Script noch anders auslesen?

Die Scripts liegen immer auf dem localhost.

Danke + Gruß,

Markus

fsockopen ("localhost", 80, ...) geht nicht? da müssten doch zumindest die (gewollten oder ungewollten) einschränkungen von allow_url_fopen umgangen werden können.

s'Amstel

Evtl den Header auslesen und wieder mitsenden ?!

Das Problem hatte ich auch mal ...

$fp = fsockopen ("www.yxz.de", 80, $errno, $errstr, 30);

if (!$fp) {

echo "$errstr ($errno)<br /><pre>\n";

} else {

fputs ($fp, "GET http://www.xyz.de?id=$id HTTP/1.0\nAccept: */*\nAccept-Language: en\User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;.NET CLR 2.0.50215)\nHost: \n\n");

$cnt=0;

$inVar = "";

while (!feof($fp) || $cnt < 2000) {

$inVar .= fgets($fp,128);

$cnt += 128;

}

$pos1 = strpos($inVar,"test.php?id=");

if($pos1 >1) {

$endpos = strpos($inVar,"\"",$pos1+23);

$code = substr($inVar,$pos1+21,$endpos-$pos1-21);

}

fclose($fp);

}

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.