Hello , well i have an url for sms gateway and i want to make a php.api file with two functions get balance and send sms . url for get balance is some thing like this http://www.domain.com/sendsms/checklogin.asp?user=******&pass=**** and url for send sms is http://www.domain.com/sendsms/sendsms.asp?username=******&password=*****&mno=number tosend&msg=message&Sid=senderid&fl=type of sms&mt= any one can help please thanks
it is so easy #get balance $data = @implode("",@file("http://www.domain.com/sendsms/checklogin.asp?user=******&pass=****")); now $data contains what page returns. regards
You know you can just send text messages as emails, i have the script i made for it from my site before i overhauled it here:
thanks vooler actually i don't get error in get balance but the problem in sending SMS it says Error Connecting to Gateway even i know the URL is correct i use this cod function SendSms($UserName,$UserPassword,$Numbers,$Originator,$Message){ $url = "http://www.domain.com/sendsms/sendsms.asp?username=".$UserName."&password=".$UserPassword."&mno=".$Numbers."&msg=".$Message."&Sid=".$Originator."&fl=".$flash."; if (!(@$fp =fopen($url,"r"))){ return "Erorr Connecting to Gateway."; }else{ @$FainalResult =@fread(@$fp, 10); @fclose(@$fp); @$FainalResult=(integer)str_replace(" ","",@$FainalResult); whats wrong here ?????is there another way to get the url.. by the way when i use the url in browser its working thanks Property_Control i really don't need sms to email as I have the sms gateway just need to make correct api thanks
Check with your hosting servic, they might not have fsockopen not working. And if the api you are using might be using fopen and you php not configured to read from urls. regards