PHP slowness with POST request

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!

Moderator: General Moderators

Post Reply
FKereki
Forum Newbie
Posts: 1
Joined: Thu Apr 19, 2007 11:00 pm

PHP slowness with POST request

Post by FKereki »

I'm trying to access a web service that requires a POST operation, and I've managed to so in at least three different ways, but it's always SLOW!!

My first try used fsockopen() and associated functions, and took about 30 seconds to get an answer. Then I tried the socket_xxxxx() functions, but the results were similar. Finally I used the curl_xxxxx() functions, and yet the same result.

HOWEVER, I also did a similar try with Python, and I got the answer within 2 seconds!

All the PHP programs worked fine, and so did the Python one, but I couldn't get any speed out of PHP.

Are there any known restrictions/problems with this? Any solutions?

Thanks!
Post Reply