Question:
Open Api Address Once ?
Mark
2015-10-15 11:23:06 UTC
I Have an HTTP API to send sms (in wordpress). I made a simple php program that is follows

$user = "xyz";
$pass = "sdfgk";
$xyz = "NORMAL" ;
$numbr = "98655345435" ;

$address = http://smsga.com/sms.php/user=$user&pas=$pass&sender=$xyz&no=$numbr&msg=thanks ;

NOW HOT TO OPEN ABOVE $address SO THAT THE MSG IS SENT (as if we open this api address once , the message will be sent)


{this may help you so that you can help me {i did'nt understood anything on this page} - http://codex.wordpress.org/HTTP_API}
Three answers:
2015-10-15 11:55:27 UTC
Like Jeff says, cURL. There's no other way to call an API from a PHP script. I mean I guess you could use file_get_contents($address); But that's going to make a GET request to the server. And any decent API is going to require a POST to make an action. GETs should only return data that exists and not take any actions.



What's the problem you have with cURL?



EDIT:



So it looks like Wordpress has basically a built in cURL wrapper. And that tutorial you linked pretty much explains it all. But without documentation on how your SMS API works I can't necessarily tell you more than just figure out what methods you need to use.
Chris
2015-10-15 12:32:57 UTC
Why do you keep asking the same stupid question without addressing previous answers in ANY WAY?



https://answersrip.com/question/index?qid=20151012070016AAFJxTg



Keep in mind that you have already violated the community guidelines at this point, so don't push this any further.

And if you prefer not to use cURL, TELL US WHY, instead of insisting on a stupid decision without giving a reason like an idiot.
Jeff P
2015-10-15 11:36:10 UTC
Just use cURL--most PHP installations have it precompiled.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...