SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Wizard
    Join Date
    Jul 2006
    Location
    New Zealand
    Posts
    1,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php script disturbution system discusssion

    Hi there,

    Ive been wanting to know if this is possible some how to do this and what i want to know is this i am wanting to have it some way so i can distibute my php scripts without having to code them ill explain in more detail below.

    i have my web application upload which is not using a database on the server called bchosting.info say i have a client called clienta.com he orders my product basically clienta.com will get a index file and a dbconnect file which will be upload to his website the index will contain some code im wanting to use curl but also if use curl can the dbconnect file be included in the output on the clienta.com end of the server i mean when clienta.com is request the address to bchosting.info it includes it when its getting processed without having to pass the database information via the url?

    if you still dont understand that ill try and explain it even simpler for you

    i have 2 servers one for php script to be uploaded on bchosting.info which will contani all files unencoded expect the database connection file.

    when user like clienta.com requests it from their site to use curl to connect to the file when it returns data from the url how curl normally does i want it so it also includes the local database of clienta.com.

    Can this be done would i have to make some sort of change by removing include("dbconnect.php"); on the bchosting.info server and using curl to get the information and then including the database connection on the local server of clienta.com?

    Can this be done if so how should i go about it i thought this would be easier as i know sooner or later my scripts will get decoded if they are encoded using zend or ioncube.

    Thanks,William

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2006
    Location
    New Zealand
    Posts
    1,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Talking about this on the local server called mydemo.com is it possible to have 5 lines of code having this.

    $Curl = Curl_Init('http://yourserver.com/scriptfile.php?cmd=' .$_GET['cmd']);
    Curl_SetOpt($Curl, CURLOPT_RETURNTRANSFER, true);
    Curl_Exec($Curl);
    $Return = Curl_GetInfo($Curl);
    return $Return['http_code'] == 200;
    on the yourserver.com and in the file called scriptfile.php has this

    if($_GET['cmd']=="Home")
    {
    echo "Hey watever";
    include("dbconnect.php";
    $r="SELECT * FROM Table where user='watever'";
    $rs=mysqli_query($con,$r);
    if(!$rs)
    {
    echo "Problem";
    }
    else
    {
    echo "Success";
    }
    }
    so on the address bar of mydemo.com can i have this so when i type in mydemo.com/index.php?cmd=Home or mydemo.com/index.php?cmd=page2 or watever at mydemo.com/index.php?cmd= is that possible without having to encypt the php code?

    Thanks,William


Bookmarks

Posting Permissions

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