I need ASP scrip or Converter

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.

I need ASP scrip or Converter

Postby imnasir » Sun Oct 29, 2006 6:54 am

i need the php script of msg send via warid, in ASP or plzz someone give me the converter to chang the PHP code in ASP,plzzzzz
imnasir
Cadet
 
Posts: 9
Joined: Wed Oct 11, 2006 6:07 am

Re:

Postby LinuxFreaK » Sun Oct 29, 2006 10:18 am

Dear imnasir,
Salam,

FYI, http://asp2php.naken.cc/

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi

Re:

Postby kbukhari » Sun Oct 29, 2006 11:21 am

LinuxFreaK wrote:Dear imnasir,
Salam,

FYI, http://asp2php.naken.cc/

Best Regards.

converter to chang the PHP code in ASP,plzzzzz


farrukh think over it :)
--
Syed Kashif Ali Bukhari
+92-345-8444420
http://sysadminsline.com
http://kashifbukhari.com
kbukhari
Major General
 
Posts: 1222
Joined: Sat Dec 31, 2005 12:29 am
Website: http://kashifbukhari.com
Location: Lahore

Postby imnasir » Mon Oct 30, 2006 8:11 am

Sir G,
i say i need the Converter Of PHP 2 ASP ..... plzzz it is ASP 2 PHP
imnasir
Cadet
 
Posts: 9
Joined: Wed Oct 11, 2006 6:07 am

Postby kbukhari » Mon Oct 30, 2006 2:52 pm

imnasir wrote:Sir G,
i say i need the Converter Of PHP 2 ASP ..... plzzz it is ASP 2 PHP

Code: Select all

<%
Dim gv_userName, gv__SESSION(), gv_GetSessID, gv_result, gv_SessionID, gv_GetEngID, gv_EngineID, gv__POST()


session_start();
################Set these Varibale accordingly with valid input data##################
gv_userName = "3214XXXXX"
' Your valid number to login
   $pass = "XXXXXXXX"
   ' Your valid password.
   #####################################################Function fn_curly ( lv_page,lv_post )

   Dim lv_page, lv_post, lv_url
         ' multiline comment removed
      lv_url = "https://www.waridtel.com/cgi-bin/warid/dev1/warid/"
      $ch  = curl_init()
      curl_setopt($ch, CURLOPT_URL,$url.$page);
 curl_setopt($ch, CURLOPT_FAILONERROR, 1);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 curl_setopt($ch, CURLOPT_TIMEOUT, 15);
   If $post then
         curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
End If

curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
 $result  = curl_exec($ch)
      curl_close($ch);
   fn_curly = $result
   End Function

Function fn_valid ( $check )

   Dim lv_
         If strrpos($check, "BV_SessionID") then
         fn_valid = true
         Else
         fn_valid = false
      End If
End Function

#####################Step one getting session ID and Engine ID ###############If gv__SESSION("SessID") == "" then
      gv_GetSessID  = "/(BV_SessionID=)(.*)(&BV)/i"
      $GetEngID  = "/(EngineID=)(.*)(&channelId)/i"
      gv_result  = curly("homepage","")
      preg_match(gv_GetSessID, gv_result, gv_SessionID);
   preg_match(gv_GetEngID, gv_result, gv_EngineID);

gv__SESSION('SessID') = $SessionID[2]
      gv__SESSION('EngID') = $EngineID[2]
      gv_result  = curly("login", "BV_SessionID=" & $_SESSION["SessID"] & "&BV_EngineID=" & gv__SESSION("EngID") & "&userName=" & gv_userName & "&ndc=" & substr($userName,0,3) & "&userName2=" & substr(gv_userName,3) & "&pass=" & $pass)
      If !valid($result) then
         die ("Error IN LogIn.")End If
End If

If ($_POST["action"] != "") && (gv__SESSION("SessID") != "") then
      gv_result  = curly("program","BV_SessionID=" & gv__SESSION("SessID") & "&BV_EngineID=" & gv__SESSION("EngID") & "&mobilelist=&programId=39767&countrycode=92&recipientnumber=&numbersadd=92" & gv__POST("numbersadd") & "&textarea=" & gv__POST("textarea") & "&Connect0=Send+Message&fromPage=web2sms")
      If !valid(gv_result) then
         die ("Error in Sending SMS.")End If

Response.Write "SMS SENT"
   End If


%>
<form name="smsform" method="post" action="<%
=Request.ServerVariables("SCRIPT_NAME")?>">
<input type=hidden name=action value=1>
mobile number without initial 0 : <input type="text" name="numbersadd" value=""> (like 3334253647)<br>
<textarea rows="6" name="textarea" cols="56"></textarea><br>
<input type="submit" value="Send Message" name="Connect0">
</form>

this script wont work for you until you port curl extention in asp
--

Syed Kashif Ali Bukhari

+92-345-8444420

http://sysadminsline.com

http://kashifbukhari.com
kbukhari
Major General
 
Posts: 1222
Joined: Sat Dec 31, 2005 12:29 am
Website: http://kashifbukhari.com
Location: Lahore


Return to “%s” Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron