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
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

 

 

Link to comment
Share on other sites

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"?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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