Results 1 to 5 of 5

Thread: How to Convert PHP Code to VB6 Code

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2017
    Posts
    134

    How to Convert PHP Code to VB6 Code

    Hi everyone,

    i have source PHP How to Convert PHP to VB6.

    [CODE]<?
    //-------------------------------------------------------------------------------------------
    // PHP SCRIPT FOR sites HTTP Interface
    // (c) 2006 sites
    // all rights reserved
    // last update: 15 Oct 2006
    //-------------------------------------------------------------------------------------------

    // ErrNo="000" ErrMsg="Message Has Been Sent"
    // ErrNo="001" ErrMsg="Message Has Been Queued"
    // ErrNo="010" ErrMsg="Authentication failed, Invalid UserName Or Password"
    // ErrNo="011" ErrMsg="Authentication failed, User Not Active"
    // ErrNo="012" ErrMsg="Authentication failed, User Expired"
    // ErrNo="020" ErrMsg="Invalid Sender"
    // ErrNo="030" ErrMsg="Invalid Phone Numbers"
    // ErrNo="040" ErrMsg="Invalid Unicode parameter"
    // ErrNo="050" ErrMsg="Credit Not Available"
    // ErrNo="060" ErrMsg="SMSData Not valid"
    // ErrNo="070" ErrMsg="Session Time Out"
    // ErrNo="080" ErrMsg="Database Error"
    // ErrNo="090" ErrMsg="Gateway Error"
    // ErrNo="999" ErrMsg="Authentication failed, Error"

    $userName = "xxxxxxxxx"; // Mandatory Max 20 Bytes String Username of customer userName
    $password = "yyyyyyyyy"; // Mandatory Max 20 Bytes String password of customer password
    $sender = "testSMS"; // Mandatory Max 16 Digits or 11 characters alpahnumeric Originator
    $phonenumbers = "9665xxxxxxxx,9665yyyyyyyy"; // Mandatory Max 16384 Bytes List of one or several recipient phone number to receive the SMS (separated by commas)
    $SMSData = "This is a test message"; // Mandatory Max 4096 Bytes String SMS Message
    $Unicode = "english"; // Mandatory Max 8 Bytes String Type of message arabic or english or unicode

    $userName = urlencode($userName);
    $password = urlencode($password);
    $sender = urlencode($sender);
    $phonenumbers = urlencode($phonenumbers);
    $SMSData = urlencode($SMSData);
    $Unicode = urlencode($Unicode);


    //-------------------------------------------------------------------------------------------
    // BUILDS THE STRING TO SEND TO THE SERVER
    //-------------------------------------------------------------------------------------------

    $StringHttpPost="userName=".$userName."&password=".$password."&phonenumbers=".$phonenumbers."&sender =".$sender."&SMSData=".$SMSData;
    $StringHttpPost=$StringHttpPost."&Unicode=".$Unicode;
    $len = strlen($StringHttpPost);


    //---------------------------------------
    // IF USE PROXY
    //---------------------------------------
    //$p = "POST http://www.sites.net/api/httpsend_utf8.asp HTTP/1.0\r\n"; // Use This String

    //---------------------------------------
    // IF DIRECT CONNTECTION
    //---------------------------------------
    $p = "POST /api/httpsend_utf8.asp HTTP/1.0\r\n"; // Use This String

    $p.= "Host: www.sites.net\r\n";
    $p.= "Content-type: application/x-www-form-urlencoded\r\n";
    $p.= "Content-length: $len\r\n\r\n";
    $p.= "$StringHttpPost\r\n";
    $p.= "\r\n";

    //---------------------------------------
    // IF USE PROXY
    //---------------------------------------

    //$ip = "1.2.3.4"; // Proxy IP
    //$port = 1234; // Proxy Port
    //$fp = fsockopen($ip,$port); // Use This String


    $fp = fsockopen %
    Last edited by coldlove; Oct 17th, 2017 at 10:10 AM.

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,856

    Re: How to Convert PHP Code to VB6 Code

    Like you translate source code from any given language to another language.

    Most of the times there is no one-to-one translation possible.
    Each language has it own way of dealing with variables, objects, but also has a different set of libraries.

  3. #3
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: How to Convert PHP Code to VB6 Code

    feel free to post the code here if you want suggestions or help. (don't use a code snippet site)

  4. #4

  5. #5
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,042

    Re: How to Convert PHP Code to VB6 Code

    [...]
    Last edited by dz32; Apr 26th, 2019 at 11:28 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width