Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Visual Basic/PHP question?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
EvilHottness
Advanced Cheater
Reputation: 0

Joined: 29 Apr 2008
Posts: 64
Location: Co

PostPosted: Sun Sep 21, 2008 7:39 pm    Post subject: Visual Basic/PHP question? Reply with quote

Alright so i've made a vb based server works great runs what i want on it, but how would i implement PHP into my VB6 web server? you know how when you install php with apache , copies files and picks it up basically is it possible to do it the same way or should i try installing php and configuring it to my vb webserver is this possible?
_________________
Back to top
View user's profile Send private message
Polynomial
Grandmaster Cheater
Reputation: 5

Joined: 17 Feb 2008
Posts: 524
Location: Inside the Intel CET shadow stack

PostPosted: Tue Sep 23, 2008 7:22 pm    Post subject: Reply with quote

I'm actually surprised at myself for not realising this is possible before.

PHP works in Apache using a module. The module causes the HTTP request to be sent through the PHP executable and the results of the PHP executable are sent to the client.

You can do this in VB by installing PHP somewhere and making your application run the following command line:

php C:\path\to\documents\requested_file.php

Then read the results from the standard output (stdout) with an API or if you're using .NET you can read from the StandardOutput member of the Process class.

I'm off to test this out on my simple web server in VB.NET.
Back to top
View user's profile Send private message
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Tue Sep 23, 2008 11:16 pm    Post subject: Reply with quote

heres a implemention of PHP in VB6 got this from a AshleysWebBrowser

Code:

    ElseIf Right(path, 4) = ".php" Then
        'PHP SUPPORT!
        'I have never programed in php in my life, and I've glimpsed php code only once
        'hence why it lacks some of the features (Like what? I just added cookies!) of perl.
       
        'be polite to other requests.
        While executingcgi
            DoEvents
        Wend
        executingcgi = True
       
        stats.List(Index) = "Exec PHP:" & cmd
       
        'go to the directory with the php script in it. (tell windows where '.' is)
        ChDir Left(path, InStrRev(path, "\"))
       
        'Dim parsed As Dictionary
        Dim parsed As Dictionary
        Set parsed = tophpvariables(CStr(data), CStr(postdata), CStr(headers("cookie")))
       
        fn = path & "temp.php" 'create temporary php script
       
        tempkill = fn
       
        tmp = "<?php" & vbNewLine & "echo ""Content-Type: text/html\n\n"";" & vbNewLine
        For q = LBound(parsed.Keys) To UBound(parsed.Keys)
            k = parsed.Keys(q)
            v = parsed(k)
            tmp = tmp & "$" & k & " = """ & v & """;" & vbNewLine
        Next q
        tmp = tmp & "include(""" & path & """);" & vbNewLine & "?>"
       
        Open fn For Output As #5
        Print #5, tmp
        Close #5
       
        On Error Resume Next
        If fso.FileExists("C:\temp.txt") Then Kill "C:\temp.txt"
        On Error GoTo 0
       
        'run the perl script (PHP MUST BE IN YOUR AUTOEXEC PATH VARIABLE)
        Shell "command.com /c php-cli.exe " & fn & " >""C:\temp.txt""", vbHide



What it does is ..
runs command.com /c php-cli.exe website path(FN) > C:\temp.txt

"> C:\temp.txt" is where the outputted php file goes.. so it then loads up the temp.txt file and sends it off.. its a pretty slow setup.. but what can u do about it.

_________________
Hacks I made for kongregate.
Kongregate Universal Badge Hack: http://forum.cheatengine.org/viewtopic.php?p=4129411
Kongreate Auto Rating/Voter hack: http://forum.cheatengine.org/viewtopic.php?t=263576
Took a test lol
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites