Jump to content

nicx

Members
  • Posts

    77
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nicx's Achievements

Member

Member (2/5)

0

Reputation

  1. What method to use my structure data? Or how to show my data? Give me an example,what he inputed to that form?
  2. Mr.I was create a source view html with file_get_contents() function.But that have a bug,so someone can know my cpanel username and password. Where he can know that? What method he use? My code <form action="" method="post"><input type="text" name="url" /><input type="submit" value="submit" /></form><?php$file = @file_get_contents($_POST["url"]);echo nl2br(htmlspecialchars($file));?>
  3. Guys,please help me. I have some wrong with my code,i need your help to correction it. The code: <?php header("Content-type: text/html"); header("Cache-control: no-cache"); print("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"); print("<html>"); echo "<head> <title>Frengo SMS</title> </head> <body bgcolor=\"#c7c7c7\"> "; function SendSms($name, $message, $country_code, $rmsisdn, $msisdn) { $serverRequest = "http://site.Com"; $serverRequest .= "?name=".urlencode($name); $serverRequest .= "&message=".urlencode($message); $serverRequest .= "&country_code=".$country_code; $serverRequest .= "&rmsisdn=".$rmsisdn; $serverRequest .= "&msisdn=".$msisdn; $serverResult = file_get_contents($serverRequest); if (!$serverResult) return "Returned error while trying to connect to Gateway"; $xml = simplexml_load_string($serverResult); if ($xml->ErrorDescription == "recom") //please explain what fuction for this tag $result = $xml->sent; else $result = $xml->ErrorDescription; return $result; } if ($_SERVER["REQUEST_METHOD"] == "POST") { $text=$_POST["message"]." [www.Mysite.Com] "; $smsres = sendSms($_POST["name"], "$text", $_POST["country_code"], $_POST["rmsisdn"], $_POST["msisdn"]); if (preg_match("/^\d+$/",strip_tags($smsres))) { echo "<b>[Err!] Sms Failed</b><br/> "; } else { echo "<b>[OK!] Sms Sent Successfully</b><br/>"; } echo "<br/>"; } print("<form action=\"{$_SERVER["PHP_SELF"]}\" method=\"post\">"); print("Name:<input type=\"text\" value=\"\" name=\"name\"/><br/> Text:<br/><textarea name=\"message\"></textarea><br/> Country:</br> <select name=\"country_code\"><option selected=\"selected\" value=\"62\">Indonesia (+62)</option><option value=\"44\">UK (+44)</option><option value=\"60\">Malaysia (+60)</option><option value=\"63\">Philippines (+63)</option><option value=\"65\">Singapore (+65)</option><option value=\"852\">Hong Kong (+852)</option><option value=\"67\">Brunei (+67)</option></select> <br/> Recipient: ex. 8561233xxx<br/> <input type=\"text\" mini:hint=\"phone\" value=\"8\" name=\"rmsisdn\"/><br/> Your Account: must reg at m.frengo.com to get free 100sms a day<br/> <input type=\"text\" name=\"msisdn\" value=\"\"/><br/> <input type=\"submit\" name=\"submit\" value="Send"/>"); print("</form>"); echo " </body> </html>"; ?> that shown Parse error : syntax error, unexpected T_STRING in /home2/nabrakb/public_h tml/test/index.php on line 62 whats my wrong? Help
  4. Thanks it can correct now. Thanks all
  5. Ok,i will check and try again..Thankz
  6. Why with the correct sintax code?? Please help...To write the right codes. Im very confusing
  7. Thats the full error message,pliz help me
  8. Parse error,sintax error: unexpected T_IF, expecting T_Function on line 81. Thats the complete warning.Plz help
  9. Please help me,because im a amateur in php and i can find what my mistakes with the code <?php define("EZXEZ_LIB", "EzXez Unlimited2"); define("EZXEZ_VER", "v 1.1 beta"); define("EZXEZ_BUILD", "20081202"); define("EZXEZ_AUTH", "by www.nabrak.biz.tm"); define("EZXEZ_LOGIN", "http://www.nabrak.biz.tm/ezxez/index.php"); define("EZXEZ_KIRIM", "http://www.nabrak.biz.tm/ezxez/index.php"); define("EZXEZ_CLEFT", "http://www.nabrak.biz.tm/ezxez/index.php"); Class EZXEZ { var $cookie, $ch, $is_init, $cleft, $newurl, $cLoaded; function LibName() { return array(EZXEZ_LIB,EZXEZ_VER,EZXEZ_BUILD,EZXEZ_AUTH); } function UserAgent(){ /* $agent = EZXEZ_LIB.'/'; $agent .= EZXEZ_VER.'('; $agent .= EZXEZ_BUILD.'-'; $agent .= EZXEZ_AUTH; */ return $_SERVER[HTTP_USER_AGENT]; } function Login($user, $pass, $tujuan, $pesan){ $no = $this->Nomer($user); if ($no == 0){ return 0; }else{ $cid = $no[0]; $pid = $no[1]; } $loginPost = "user=".$this->tujuan($user)."&pass=".$pass."&tujuan=".$tujuan."&pesan=".$pesan; $login = $this->useCurl(EZXEZ_LOGIN,$loginPost); if ($this->newurl == 'index.php') return 1; return 0; } function kirimSms ($user, $pass, $tujuan, $pesan,$nick="",$nolimit=1) { $pesan = ''; if (!empty($nick)){ $pesan .= $nick.'%3A%0D'; } $pesan .= rawurlencode($pesan); $hasil = ''; if ($nolimit == 1) $pesan = substr($pesan,0,160); $panjang = strlen($pesan); if (strlen($pesan)>160) $panjang = 160; $kirimPost = "user=".$this->tujuan($user)."&pass=".$pass."&tujuan=".$tujuan."&pesan=".$pesan; $kirim = $this->useCurl(EZXEZ_KIRIM,$kirimPost); //index.php?p=sendsms if ($this->newurl == 'index.php' ) { $hasil .= $tujuan.' => OK! '; }else{ $hasil .= $tujuan.' => Gagal Terkirim! '; $err = 1; } } if ($err == 1) return array(0,'Failed'); return array(1,$hasil); } function myCurl($load=1){ if($load && !$this->cLoaded){ $this->ch = curl_init(); $this->cLoaded=1; }elseif(!$load && $this->cLoaded){ curl_close($this->ch); $this->cLoaded=0; } } Public Function useCurl($url, $postfield = '',$headonly=0){ $this->newurl = ''; $this->myCurl(); if ($postfield) { curl_setopt($this->ch, CURLOPT_POST , 1); curl_setopt($this->ch, CURLOPT_POSTFIELDS , $postfield); }else curl_setopt($this->ch, CURLOPT_HTTPGET , 1); curl_setopt($this->ch, CURLOPT_NOBODY , $headonly); curl_setopt($this->ch, CURLOPT_NOBODY , 0); curl_setopt($this->ch, CURLOPT_URL , $url); curl_setopt($this->ch, CURLOPT_USERAGENT , $this->UserAgent()); curl_setopt($this->ch, CURLOPT_HEADER , 1); curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT , 10); curl_setopt($this->ch, CURLOPT_COOKIE , $this->cookie); curl_setopt($this->ch, CURLOPT_RETURNTRANSFER , 1); //curl_setopt($this->ch, CURLOPT_PROXY , "172.16.20.250:1688"); //Buat ngetes pake proxy lokal $execute = curl_exec($this->ch); preg_match_all('/Set-Cookie: (.*?)\r\n/', $execute, $roti); if ($roti[1]) $this->cookie = implode(';', $roti[1]); preg_match('/location:(.*?)\r\n/ims', $execute, $ngikut); $this->newurl = trim($ngikut[1]); return $execute; } } ?> <?php GLOBAL $sv; GLOBAL $sp; $sv = array_merge ($_ENV, $_SERVER, $HTTP_ENV_VARS, $HTTP_SERVER_VARS); $sp = array_merge ($HTTP_POST_VARS, $HTTP_GET_VARS); $GOTEXT = new EZXEZ(); $user = $sp['user']; $pass = $sp['pass']; $nick = $sp['nick']; $text = $sp['text']; $rcpt = $sp['rcpt']; $action = $sp['action']; if (isset($sp[info])) { echo 'About Script:<br/> 1. Use Only Format for login and sending message, ex: 819537xxxxx<br/> 2. You Can Use Your Name at the begining of message, Just fill Your Nick on GoText option.<br/> 3. Max char per message reduced to 160 char <br/> 4. No Ads on your message.<br/> <br/>'; }elseif ($action == 'config'){ if (isset($sp[alifia])){ $mc = 1000; $mm = 1000; $mr = 10; }else{ $mc = 160; //160 $mm = 99; //15 $mr = 10; //10 } if (isset($sp[mr])){ $mr = $sp[mr]; } echo '<config><t>EZXEZ SMS UNLIMITED By CoolZERO for Indonesia only</t> <nu>1</nu> <np>1</np> <nn>0</nn> <mr>'.$mr.'</mr> <mc>'.$mc.'</mc> <in>1</in> <mm>'.$mm.'</mm> </config>'; }elseif ($user =="" or $pass ==""){ $e = $GOTEXT->LibName(); /*echo " <title>EzXez</title></head> <form action={$_SERVER["PHP_SELF"]} method=POST>User: <input name=user type=text maxlength=14 value=> Pwd:<input name=pass type=password value=> Tujuan: <input name=rcpt type='text' id='phone' mini:hint='phone' value='+628'/><br/> Pesan: <br/><textarea name=text></textarea><br/> <input type=submit value=Send> </form> ";*/ echo "You can send sms only via http://nabrak.biz.tm or install this url to gotext apps on your phone!"; }elseif ($GOTEXT->Login($user, $pass)) { $nolimit=1; if (isset($sp[alifia])) $nolimit=1; $GOTEXT->cleft = $GOTEXT->cek_credit($nolimit); //echo 'cleft:'.$GOTEXT->cleft; if ($GOTEXT->cleft==0){ respon (3,'Maaf, credit kamu hari ini sudah habis!',isset($sp[silent])); }else{ $kirim = $GOTEXT->kirimSms($rcpt, $text,$nick,$nolimit); $sisac = $GOTEXT->cleft - 1; if ($nolimit == 1) $sisac = 'Unlimited'; if ($kirim[0]){ respon (0,'SMS terkirim ke '.$kirim[1].' Sisa credit kamu '.$sisac.' SMS',isset($sp[silent])); }else respon (0,'Sisa credit kamu '.$sisac.' SMS',isset($sp[silent])); } }else respon (2,'Username atau password salah!'); function respon($no,$text,$silent=FALSE){ $GOTXT = new EZXEZ(); $me = $GOTXT->LibName(); $text = $text.' '.$me[0].' '.$me[1].' '.$me[3]; if ($silent) $text = ''; echo '<res><num>'.$no.'</num><txt>'.$text.'</txt></res>'; } ?> [code] that shown sintax error,unexpected T_IF etc. Plz help to corrected..Thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.