Call a PHP script on remote server without SSH

I’ve just finnished working on a project where I needed to schedule a PHP script to upload and then process a CSV file. For various reasons we weren’t able to create a cron job, so in the end we decided to set a scheduled task up on a Windows server that would then run a VBS script that would in turn call the PHP script on the other server.

Call LogEntry()

Sub LogEntry()

	On Error Resume Next 

	Dim requestObj
	Dim url 

	Set requestObj = CreateObject("Microsoft.XMLHTTP") 

	url = "http://www.mywebsite.com/page.php?mode=somevariable" 
	'create a url and querystring

	requestObj.open "POST", url , false
	'add method and add url to request object

	requestObj.Send 
	'send the request

	Set requestObj = Nothing
	'clear the request object

End Sub

Change the url variable to the address of the script that you want to call and then save the file as a .vbs file which you can then run using the built in windows task scheduler.

Cake in the Wild

I’ve just finnished my first real live application built with CakePHP. It’s nothing too wild – a booking management system based on 10 tables, the only vaguely fancy bit a couple of AJAX lookup / search fields.

Considering it has been the project I’ve actually built using Cake, and I’ve been learning the framework on the job, it has been very painless. It hasn’t taken long – it is an internal project for another department that I’ve squeezed in when I need a break from whatever else I’m doing.

The hardest part has been geetiing used to the format of query results, but that is easily solved with a quick print_r() and it has been a dream to debug and tweak, just working through it with the main guy who will be using it.

Training Database