can we use php to send a file to another like in MSN Messenger? I am working on a chat script and was wondering if its possible or not to send a file to the other person during chat?
i am using jquery/mysql/textfiles/php for this script
How is the communication between your clients done?
You cannot send a file from a client directly to another client using PHP, as it's a server side language.
You could however upload the file to your server, and then send a link to the recieving client for download.
Related
I am making APIs.
I'm using CentOS for web server, and another windows server 2016 for API server.
I'm trying to make things work between web server and window server.
My logic is like following flow.
1) Fill the data form and click button from web server
2) Send data to windows server
3) Python script runs and makes more data
4) More made data must send back to web server
5) Web server gets more made datas
6) BAMM! Datas append on browser!
I had made python scripts.
but I can't decide how to make datas go between two servers..
Should I use ajax Curl in web server?
I was planning to send a POST type request by Curl from web server to Windows server.
But I don't know how to receipt those datas in windows server.
Please help! Thank you in advance.
First option: (Recommended)
You can create the python side as an API endpoint and from the PHP server, you need to call the python API.
Second option:
You can create the python side just like a normal webpage and whenever you call that page from PHP server you pass the params along with HTTP request, and after receiving data in python you print the data in JSON format.
I am android developer and zero at back end process. Whats stuff/tools require for making a server/website that receives files from android app. I listen somewhere that php code is required as backend on server side. Is is true?
hoping for detailed explanation. Sorry for my english.
Thanks.
need php file for coonecting with database.use phpmyadmin(xampp)
tool for creating database.then create phpfile n post on server or localhost. after that use url in android.like our php link is localhost:80/phpproj/trial.php
and pass value to database using asyctask method.
Hi Guys I am just this curious, I wonder if PHP can do this stuff:
I have an anchor tag that says "send email to admin".
What I want to do is to open a default email client such ms outlook or lotus and automatically create an empty mail message.
I only want PHP to do it. Is it possible?
If it may, how should I do it?
Use HTML - the browser will handle it.
Click me
PHP only runs on the webserver, it has no access to the programs on a client-computer.
I think you want to use mailto
Fritz Eierschale, fritz.eierschale#example.org
What you describe is possible, though not directly by means pf php:
If I got you right, then you want to offer sending such an email on a web page created by means of php. If so, then all you have to do is use a "mailto" reference. The clients environment will decide what application to open to use that link:
Send email to admin
Note however that this only works, if there is a local email client installed and configured at all on the client side. More and more users use web based email applications instead of a local client, with all the disadvantages. In such case the clients system will popup an error about no suitable application available...
I have .Net client that sends files.
How can i use PHP web service to get those files and return them after some changes back to client??
I didn't found code to GET those files, maybe someone have a code example...
You can send the file data encoded in Base64 from the client to your PHP web service, and handle them with the $_FILES superglobal. There is a similar topic here : PHP SOAP Transfering Files
Hello i have iphone app now i want to send request or data to server or PHP file.
Please note: the php file is on another server not on the same server.
How can i send data to server using javascript ?
The fastest and easiest solution would be including jQuery and use it's post method; http://api.jquery.com/jQuery.post/