erfan shaigani
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by erfan shaigani
-
-
Hi , I am not familiar with javascript at all , I am going to learn node.js
(I have a good background in python , c )
now , I don't know where to start, should I master js then go for nodejs , or a basic learning of js is adequate for nodejs or...
I will appreciate if you suggest useful sources and websites to learn .
Thanks in advance
-
9 hours ago, Ingolme said:
I'm not sure how Python is sending the data, but your PHP code will depend on the format of the data.
Assuming that Python is sending a JSON string, you can read the string using file_get_contents('php://input') and transform it into an array or object using json_decode().
<?php $input = file_get_contents('php://input'); $data = json_decode($input, true); // Print out the structure for testing var_dump($data); ?>
thanks a lot it worked for me , but i have another question , what if i want to send a file i mean really a file.json to a directory on my server?
-
hi , in the python requests POST tutorial in the site , there is this piece of code ,
url = 'https://ipaddress of my server .../myphp.php'
myjson = {'somekey': 'somevalue'}x = requests.post(url, json = myjson)
it sends the json data to a php file in a server that i have access to
how can I access json data in myphp.php file in the server ???
thanks
get the contents of a GET http method
in PHP
Posted
hi , im using python to make a get request to a my server and I want to get the 'params'
#the file demo.php looks for a 'model' ...
how can I do that?