Willkommen ~Gast!
Registrieren || Einloggen || Hilfe/FAQ || Staff
Probleme mit der Registrierung im Forum? Melde dich unter registerEin Bild.
Autor Beitrag
000
09.10.2006, 22:04
Tino



Ich muss für ein kleines Projekt Post Daten per PHP versenden also so wie mit einem hHTML Formular nur ohne Formular^^.

EDIT:

achja wegen der auftretenden Frage... DAS SOLL KEIN SPAMBOT WERDEN

--

RIP tino579 ^^


Dieser Beitrag wurde am 09.10.2006 um 22:05 von tino579 bearbeitet.
zum Seitenanfang zum Seitenende Profil || Suche
001
09.10.2006, 22:12
K-Putt



cURL ist die Lösung.

PHP-Quellcode:<?php
//curl6.php

// populate the array containing the values to be posted.
$postfields = array();
$postfields['field1'] = urlencode('value1');
$postfields['field2'] = urlencode('value2');

$ch curl_init();

// Follow any Location headers
curl_setopt($chCURLOPT_FOLLOWLOCATION1);

curl_setopt($chCURLOPT_URL'http://www.example.co.za/recipient2.php');
curl_setopt($chCURLOPT_RETURNTRANSFER1);

// Alert cURL to the fact that we're doing a POST, and pass the associative array for POSTing.
curl_setopt($chCURLOPT_POST1);

curl_setopt($chCURLOPT_POSTFIELDS$postfields);

$output curl_exec($ch);
curl_close($ch);
print 
$output;
?>
Quelle

--

Rambo Engineer @ Drippy's 2fort - finest TFC 1.5 || Bild Upload || The world's most advanced open source database

zum Seitenanfang zum Seitenende Profil || Suche
002
09.10.2006, 22:22
Tino



Das ging ja schnell :-)

thx

--

RIP tino579 ^^

zum Seitenanfang zum Seitenende Profil || Suche