Need to post the input to a server from my script and retrieve the output

I want to post my input to a server from my script and retrieve the output. In the web server in which i want to post generates random session ids which i want to track and retrieve the data. i have tried to write something like this!!..

<?php if(isset($_POST['sequence1'])){ $name=$_POST['sequence1']; $messge=$_POST['sequence2']; $postdata = http_build_query( array( 'function' => $_POST['function'], 'dosubmit' => $_POST['dosubmit'], 'miRNA_seqcon' => $_POST['sequence1'], 'cDNA_seqcon' => $_POST['sequence2'], 'expect' => $_POST['expectation'], 'hspsize' => $_POST['hspsize'], 'upe' => $_POST['upe'], 'targetup' => $_POST['targetup'], 'targetdown' => $_POST['targetdown'], 'targetsize' => $_POST['targetsize'] ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: output url.do', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = @file_get_contents('output url.do?sessionid=1381168279739217', false, $context); //process_request is the php on which you want to process another file print_r($result);

What are your results? and where are you getting stuck?

Sponsor our Newsletter | Privacy Policy | Terms of Service