PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
How do I make HTTP post to a remote location with php as you can do with javascript, well javascript can't do it to remote locations but I mean that it can do post to local?
So I repeat my question: How do I make HTTP post with php?
Thanks for your time and using it to read my post.
superdezign wrote:What about them? Are you too lazy to actually learn how to send a post...?
Ehm... I don't know what you mean? I don't understand why php wouldn't have built-in functions to send get and post requests, like ajax. Maybe I don't understand post in the right way.
JellyFish wrote:Ehm... I don't know what you mean? I don't understand why php wouldn't have built-in functions to send get and post requests, like ajax. Maybe I don't understand post in the right way.
And btw I have sent a post, just not with php.
Ahh. Yeah, sending posts manually actually requires you to write the request, and send it.
JellyFish wrote:Ehm... I don't know what you mean? I don't understand why php wouldn't have built-in functions to send get and post requests, like ajax. Maybe I don't understand post in the right way.
And btw I have sent a post, just not with php.
Ahh. Yeah, sending posts manually actually requires you to write the request, and send it.
I think I'm understanding more now. I don't want to make a direct connection with a server as I would do with cURL. You see, this is actually the reason I would like to post information to another location on a remote server.
Here's the situation. My hosting service, a shared service, wouldn't open a port for me. So my only alternative is to post information to a server rather then connect directly. They say to do this with an HTML form. So say I to myself, (what a wonderful world, just kidding), I say to myself "HTML forms are no more then post or get requests to a server, which I could do with ajax, why couldn't I do it with php?". And so I went to php.net an started searching for something and went to the kickass forum and started a thread.
So I don't want to connect to the server(that I'm trying to communicate with) in anyway other then sending a request. I noticed that the fsockopen method acquires a port number in one of there parameters, this makes me think that it's doing exactly what cURL would do.
JellyFish wrote:So I don't want to connect to the server(that I'm trying to communicate with) in anyway other then sending a request. I noticed that the fsockopen method acquires a port number in one of there parameters, this makes me think that it's doing exactly what cURL would do.
It is the remote port, not the local one ...
There are 10 types of people in this world, those who understand binary and those who don't
JellyFish wrote:So I don't want to connect to the server(that I'm trying to communicate with) in anyway other then sending a request. I noticed that the fsockopen method acquires a port number in one of there parameters, this makes me think that it's doing exactly what cURL would do.
It is the remote port, not the local one ...
Does this mean that I don't need a port open for my server?
I don't understand php.net's description on fsockopen. What does "Open Internet or Unix domain socket connection" mean? I searched wikipedia for Internet Sockets and Unix Domain Sockets and found two articles about them that, I'm sorry to admit, I dont understand aswell.
How do I find out all this stuff in more simple terms? I find that when I'm reading a description about something it usually includes words that are really specific, but I don't understand the concepts that they refer to. Take this definition for example:
"An Internet socket (or commonly, a socket or network socket), is a communication end-point unique to a machine communicating on an Internet Protocol-based network, such as the Internet."
Yeah that's a great description and all but what I get out of it is a bunch of words, I need visuals.