Jump to content

convert php script into .exe file


sheraz

Recommended Posts

Hi , i want to create an application which will send emails to the users at a given time. for this purpose i am trying to use windows scheduler. but the problem is that windows scheduler requires only .EXE files.

 

So is there any way to convert my php code into .exe file so that i can get my required goals. >:(

Link to comment
https://forums.phpfreaks.com/topic/204621-convert-php-script-into-exe-file/
Share on other sites

You can schedule a VB script to run that will request a URL. Name the following script scheduled.vbs (or a similar name) -

 

'************************************************
'* schedule this VB Script to fetch/execute a web page
'************************************************

url = "http://yourdomain.com/yourscript.php"


goURL url, "GET", ""


sub goURL(url, method, data)
'uses the MSXML COM for http request
set objReq = CreateObject("Microsoft.XMLHTTP.1")
    If method = "GET" Then
        objReq.open "GET", url & "?" & data, False
        objReq.Send ""
    Else
        objReq.open "POST", url, False
        objReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
        objReq.Send data
    End If
    set objReq = nothing
end sub

 

 

Hi , i want to create an application which will send emails to the users at a given time. for this purpose i am trying to use windows scheduler. but the problem is that windows scheduler requires only .EXE files.

 

So is there any way to convert my php code into .exe file so that i can get my required goals. >:(

 

Doesn't it allow you to pass parameters to the programs so you can do something like "C:\php5\php.exe C:\path\to\script.php"?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.