Jump to content

nemesisphp

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nemesisphp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. can someone help me create a cURL for this? i think its a get method, right? Access it including the GET parameters and make sure that settings are also follows. Dispatcher URL: http://website.net/gw/dispatcher.woof GET Parameters: RRN is the random reference number SRC is the access code (i.e 2336) DST is the recipient of the message (i.e. 639209547958) MSG is the actual reply message up to 420 characters, including non printable characters. KYWRD is the primary keyword (i.e. hello) need help. thanks.. this is my current code <?php //getting the value of RRN $rrn=urlencode($_GET['rrn']); //getting the value of MSG $msg=urlencode($_GET['msg']); //getting the value of DST $dst=urlencode($_GET['dst']); //getting the value of SRC $src=urlencode($_GET['src']); //setting up the value of KYWRD $kywrd = urlencode('KEYWORD'); //assuming that the dst here is 2336 $aw = "haha"; $str= "?src=".$dst."&dst=".$src."&msg=".$aw."&rrn=".$rrn."&kywrd=".$kywrd; print $str; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,' http://www.website.net/gw/dispatcher.woof'.$str); curl_exec($ch); curl_close($ch); ?> Is this correct? Thanks
  2. Just want to ask how to create a login system using these wml and php? i have a background on connecting html php and the database.. but in these wml i am confused.. can someone help me? What i'ved got here is Wap Proof for wap emulator to test my codes.. You can download it here http://www.wap-proof.com/ i have tried this code but i gets me to error.. // login.php <?php # Header Info header('Content-Type: text/vnd.wap.wml', true); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); # Version Type print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; # Import config file include "/home/jamieb/private/conf.php"; # Connect to database mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname); ?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <!-- THIS IS THE LOGIN CARD --> <card id="login" title="Login"> <p> <do type="accept" label="Login"> <go href="process.php" method="post"> <postfield name="userName" value="$userName" /> <postfield name="password" value="$password" /> </go> </do> </p> <p> User Name: <input title="userName" name="userName" /> <br /> Password : <input title="password" name="password" type="password" /> <br /> </p> </card> </wml> // process.php <?php # Header Info header('Content-Type: text/vnd.wap.wml', true); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); # Version Type print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; # Import config file include "/home/jamieb/private/conf.php"; # Connect to database mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname); # Verify the user $sql = mysql_query("SELECT userName,nickName FROM table WHERE userName = '".strtolower($_POST['userName'])."' AND password = '".md5($_POST['password'])."'"); $row = mysql_num_rows($sql); $login = mysql_fetch_array($sql); $user = md5($login['userName']); $nick = $login['nickName']; if ($row == 0): ?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="failed" title="Login Failed"> <p> Sorry, username or password incorrect! </p> <p> <anchor>Home <go href="index.php#menu" /> </anchor> <do type="prev" label="Back"><prev/></do></p> </card> </wml> <?php exit; else: ?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="success" title="Login Success"> <p> <do type="accept" label="Admin"> <go href="admin.php" method="post"> <postfield name="session" value="<?php echo "$user"; ?>" /> </go> </do> </p> <p>Welcome <?php echo "$nick"; ?>, please enter the admin area.</p> </card> </wml> <?php endif; ?> My problem here is it doesn't open anything on the wap proof.. or if i ever open it i can't see the submit button.. can someone give some login scripts using php wml? thanks
  3. Does anyone have the scipt for defining if a site is open by desktop or a mobile? need help.. Please
×
×
  • 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.