http://zaslonipuk.epizy.com/test.php
Hi I am new to all this and I hope you can help me, thanks in advance. I was sending GET and POST requests with python requests library and I get code 200, but script doesn’t run. But, when I type url in browser script runs.
Python code:
import requests
#userdata = {“api_key”: “tPmAT5Ab3j7F9”, “value1”: “1124”}
resp = requests.get(‘http://zaslonipuk.epizy.com/test.php’)
print(resp)
PHP script:
<?php if (isset($_POST)){ $myfile = fopen("post.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); fclose($myfile); } else{ $myfile = fopen("get.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); fclose($myfile); } ?>I’m using this software:
Additional information:
I already altered my PHP config to display errors. I am on free account.