Home php How to send a GET request via PHP?

How to send a GET request via PHP? [duplicate]

Author

Date

Category

At this address
http://smsc.ru/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>
you need to send a GET request.
How can this be done with PHP?


Answer 1, authority 100%

How can this be done with PHP?

file_get_contents ("http://example.com/sys/send.php?login=&psw=& ; phones = & amp; mes = ");

Answer 2

This can be done using the curl module, it allows you to form a request taking into account cookies and other http headers, is very convenient to use, and quite flexible. Using this module, you can not only make a request to get

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions