fsockopen statt file_get_contents für HTTP-Requests

Bei zahlreichen Webspace-Providern ist die Funktionalität von file_get_contents für http deaktiviert. Es treten dann Fehlermeldungen wie

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in [..] und

Warning: file_get_contents([..]) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in [..]

auf. Mit folgender Funktion kann man das Verhalten von file_get_contents jedoch emulieren.

(more…)

Bookmarklet erstellen: Methode bei HTML-Formularen ändern

Als Entwickler ist es oft wichtig zu sehen welche Daten übetragen werden. Gründe hierfür sind z.B. Sicherheit und Debuging. Folgendes Bookmarklet, wandelt alle Formulare auf der Seite von post- auf get-Formulare um.

(more…)