I
I
Igor Seroukhov2015-10-15 21:57:18
PHP
Igor Seroukhov, 2015-10-15 21:57:18

How to create a server to create a file on it?

Good day!
The question arose of how to organize a server in php to receive data (get or post) from another site, after which the creation of a folder and a file with this data (there are no problems with the functions of creating folders and a file).
I want to make something like a widget for a site with a form that can be added to any site and send data to my server. But the problem is that I don't know how to organize a server for this. There is an idea to make a project, for example, on denwer, like a regular site. And in the form, In the action, write the path to the handler file, for example, server/accept/index.php , add a condition in it, if ($_GET) {...}, but the problem is that this page can be visited anyone who wants to, and it seems to me that it will be somehow wrong.
Can you please tell me how to organize a server to accept and process a request?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Skobkin, 2015-10-15
@GoodNickStar

how to set up a server in php

The server does not need to be organized in PHP. Better to use Nginx or Apache.
There is no fundamental difference from where to receive it.
Better understand how to work with the database (read about PDO ).
The server will arrange for you any paid or free hosting for PHP. You need to write a script.
That is, you want the script to be available to everyone and not available to everyone at the same time? Or what do you want?

S
Sergey, 2015-10-15
@gangstarcj

Can you write a simple php script that will create a folder if you pass get and post?
Write a js file that will connect to another site, and there is also a form that sends this data.
So, you need to make protection, you can make a registration in which domains and keys will be indicated, which are registered in the form with the client. You check this data and if everything is correct, then your file creation script works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question