public function submitFeed(){
        if (!$this->feedContent){
            $this->log("Feed's contents must be set in order to submit it!",'Warning');
            return false;
        }
        if (!array_key_exists('FeedType',$this->options)){
            $this->log("Feed Type must be set in order to submit a feed!",'Warning');
            return false;
        }
        
        $url = $this->urlbase.$this->urlbranch;
        
        $query = $this->genQuery();
        
        $path = $this->options['Action'].'Result';
        if ($this->mockMode){
           $xml = $this->fetchMockFile()->$path;
        } else {
            $headers = $this->genHeader();
            $response = $this->sendRequest("$url?$query",array('Header'=>$headers,'Post'=>$this->feedContent));
            
            if (!$this->checkResponse($response)){
                return false;
            }
            
            if (isset($response['code']) && $response['code'] == '200'){
                $body = strstr($response['body'],'<');
                $xml = simplexml_load_string($body)->$path;
            } else {
                $this->log("Unexpected response: ".print_r($response,true),'Warning');
                $xml = simplexml_load_string($response['body'])->$path;
            }
            
            
        }
        
        $this->parseXML($xml->FeedSubmissionInfo);
        
    }
public function submitFeed(){
        if (!$this->feedContent){
            $this->log("Feed's contents must be set in order to submit it!",'Warning');
            return false;
        }
        if (!array_key_exists('FeedType',$this->options)){
            $this->log("Feed Type must be set in order to submit a feed!",'Warning');
            return false;
        }
        
        $url = $this->urlbase.$this->urlbranch;
        
        $query = $this->genQuery();
        
        $path = $this->options['Action'].'Result';
        if ($this->mockMode){
           $xml = $this->fetchMockFile()->$path;
        } else {
            $headers = $this->genHeader();
            $response = $this->sendRequest("$url?$query",array('Header'=>$headers,'Post'=>$this->feedContent));
            
            if (!$this->checkResponse($response)){
                return false;
            }
            
            if (isset($response['code']) && $response['code'] == '200'){
                $body = strstr($response['body'],'<');
                $xml = simplexml_load_string($body)->$path;
            } else {
                $this->log("Unexpected response: ".print_r($response,true),'Warning');
                $xml = simplexml_load_string($response['body'])->$path;
            }
            
            
        }
        
        $this->parseXML($xml->FeedSubmissionInfo);
        
    }
public function submitFeed ( ) { if ( ! $ this -> feedContent ) { $ this -> log ( "Feed's contents must be set in order to submit it!" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( 'FeedType' , $ this -> options ) ) { $ this -> log ( "Feed Type must be set in order to submit a feed!" , 'Warning' ) ; return false ; } $ url = $ this -> urlbase . $ this -> urlbranch ; $ query = $ this -> genQuery ( ) ; $ path = $ this -> options [ 'Action' ] . 'Result' ; if ( $ this -> mockMode ) { $ xml = $ this -> fetchMockFile ( ) -> $ path ; } else { $ headers = $ this -> genHeader ( ) ; $ response = $ this -> sendRequest ( "$url?$query" , array ( 'Header' => $ headers , 'Post' => $ this -> feedContent ) ) ; if ( ! $ this -> checkResponse ( $ response ) ) { return false ; } if ( isset ( $ response [ 'code' ] ) && $ response [ 'code' ] == '200' ) { $ body = strstr ( $ response [ 'body' ] , '<' ) ; $ xml = simplexml_load_string ( $ body ) -> $ path ; } else { $ this -> log ( "Unexpected response: " . print_r ( $ response , true ) , 'Warning' ) ; $ xml = simplexml_load_string ( $ response [ 'body' ] ) -> $ path ; } } $ this -> parseXML ( $ xml -> FeedSubmissionInfo ) ; }
Submits a feed to Amazon.

Submits a <i>SubmitFeed</i> request to Amazon. In order to do this, both
the feed's contents and feed type are required. The request will not be
sent if either of these are not set. Amazon will send a response back,
which can be retrieved using <i>getResponse</i>.
@return boolean <b>FALSE</b> if something goes wrong
Submits a feed to Amazon .