Re: Posting File as a parameter to PHP/HTML using HTTP POST

2008-12-02 Thread S.Selvam Siva
I myself have found the solution. Instead of: br[br['uploadedfile']=open("C:/ > > Documents and Settings/user/Desktop/Today/newurl-ideas.txt") We Need to use: br.add_file(open("C:/ > > Documents and Settings/user/Desktop/Today/newurl-ideas.txt"), > filename="newurl-ideas.txt",name="uploadedfile"

Posting File as a parameter to PHP/HTML using HTTP POST

2008-12-02 Thread S.Selvam Siva
I am trying to post file from python to php using HTTP POST method. I tried mechanize but not able to pass the file object. from mechanize import Browser br=Browser() response=br.open("http://localhost/test.php";) br.select_form('form1') br['uploadedfile']=open("C:/Documents and Settings/user/Desk