开发者

How to write to a remote domain

I have a domain www.example.com

In the domain, www.example.com/write directory is chmod to 777. Now, suppose, if I want to create a new directory l开发者_如何学Goike www.example.com/write/new from www.some-domain.com, what should I be doing.

I know PHP, Python. Please relate the answers to this.


You want to do this over HTTP? Have a look at WebDAV.


Write yourself a small PHP/Python app that takes a path and a token (or user/pass) as parameter. Use the token to authenticate yourself to the script and the path as the name for the directory to create. It's probably a good idea to do some path checking (like no ".." and "/") to prevent that script from getting hijacked.

Cheers,
Fabian

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜