Pokud dobře chápu, potřebuješ nějakým PHP skriptem odeslat formulář s daty na nějaké jiné stránce...
Základ je zjistit, jestli se formulář odesílá metodou POST, nebo GET...
Pokud GET, je to jednoduchý. Řekněme, že máš formulář na stránce http://www.server.cz/adresar/form.php
Kód:
<form name="formular" method="get" action="zpracuj.php">
<input type="text" name="txtpole">
<input type="submit">
</form>
- tenhle formulář odešleš jednoduše zavoláním téhle adresy (třeba fcí fsockopen()):
Kód:
http&#58;//www.server.cz/adresar/zpracuj.php?txtpole=nejakahodnota
Pokud je metoda POST, je to složitější. Máme formulář na stránce http://www.server.cz/adresar/form.php
Kód:
<form name="formular" method="get" action="zpracuj.php">
<input type="text" name="txtpole">
<input type="submit">
</form>
Takový formulář odešleme tímhle skriptem (použijeme funkci HTTP_Post():

Kód:
function HTTP_Post&#40;$URL,$data,$referrer=""&#41; &#123;
	// parsing the given URL
	$URL_Info=parse_url&#40;$URL&#41;;
	// Building referrer
	if&#40;$referrer==""&#41; // if not given use this script as referrer
		$referrer=$_SERVER&#91;"SCRIPT_URI"&#93;;
	// making string from $data
	foreach&#40;$data as $key=>$value&#41;
		$values&#91;&#93;="$key=".urlencode&#40;$value&#41;;
	$data_string=implode&#40;"&",$values&#41;;
	// Find out which port is needed - if not given use standard &#40;=80&#41;
	if&#40;!isset&#40;$URL_Info&#91;"port"&#93;&#41;&#41;
		$URL_Info&#91;"port"&#93;=80;
	// building POST-request&#58;
	$request.="POST ".$URL_Info&#91;"path"&#93;." HTTP/1.1\n";
	$request.="Host&#58; ".$URL_Info&#91;"host"&#93;."\n";
	$request.="Referer&#58; $referer\n";
	$request.="Content-type&#58; application/x-www-form-urlencoded\n";
	$request.="Content-length&#58; ".strlen&#40;$data_string&#41;."\n";
	$request.="Connection&#58; close\n";
	$request.="\n";
	$request.=$data_string."\n";
	$fp = fsockopen&#40;$URL_Info&#91;"host"&#93;,$URL_Info&#91;"port"&#93;&#41;;
	fputs&#40;$fp, $request&#41;;
	while&#40;!feof&#40;$fp&#41;&#41; &#123;
		$result .= fgets&#40;$fp, 128&#41;;
	&#125;
	fclose&#40;$fp&#41;;
	return $result;
&#125;
HTTP_Post&#40;"http&#58;//www.server.cz/adresar/zpracuj.php",Array&#40;"txtpole"=>"nejakahodnota"&#41;&#41;;