tags:

views:

44

answers:

1

I'm trying to use this python script to upload a file to the w3c validator.

~/Desktop/urllib2_file$ python test-upload.py -u http://validator.w3.org/ -f ../index.php -n uploaded_file -p Content-Type=text/html > ../results.html && firefox ../results.html

Any help will be greatly appreciated!

EDIT:

cyraxjoe pointed out I needed to run it through php first. I tried this, but got the same result:

php -f /opt/lampp/htdocs/index.php > index.html && python urllib2_file/test-upload.py -u http://validator.w3.org/ -f index.html -n uploaded_file -p Content-Type=text/html > results.html && firefox results.html
+1  A: 

You are uploading a php-script which is a server-side script, you need to upload the resulting html after the php procesing. Perhaps with php-cli then store in a file the resulting text and upload that file.

cyraxjoe
Nona Urbiz