Install PHP as FastCGI on XP

1. Do not use the web platform installer. If you already have, uninstall PHP and FastCGI using the Control Panel 2. Download the Non Thread Safe ZIP version from http://windows.php.net/download/, unpack it in C:\PHP5 3. Download FastCGI from http://www.iis.net/download/FastCGI (already included in Windows 7) 4. Add the .php file extension mapping using the IIS manager […]

Schedule a background task in ASP.Net

private static CacheItemRemovedCallback OnCacheRemove = null; protected void Application_Start(object sender, EventArgs e) { AddTask(“DoStuff”, 60); } private void AddTask(string name, int seconds) { OnCacheRemove = new CacheItemRemovedCallback(CacheItemRemoved); HttpRuntime.Cache.Insert(name, seconds, null, DateTime.Now.AddSeconds(seconds), Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, OnCacheRemove); } public void CacheItemRemoved(string k, object v, CacheItemRemovedReason r) { // do stuff here if it matches our taskname, like WebRequest […]

How to create / consume a .Net web service

[WebService(Namespace = “http://server”)] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class myservice : WebService { [WebMethod] public string someq(string var1, string var2) { return var1+var2; } <?php $wsdl = “http://server/service.asmx?wsdl”; $client = new SoapClient($wsdl); var_dump($client->someq(array(‘var1’=>”val1″, ‘var2’=>”val2″))); ?>

Bad Behavior has blocked 630 access attempts in the last 7 days.