Skip to content

Tag: php

Formulas to Calculate Geo Proximity

I need to implement a Geo proximity search in my application but I’m very confused regarding the correct formula to use. After some searches in the Web and in StackOverflow I found that the solutions are: Use the Haversine Formula Use the Great-Circle Distance Formula Use a Spatial Search Engine in the …

Download of .zip file runs a corrupted file php

I’m trying to force a download of a protected zip file (I don’t want people to access it without logging in first. I have the function created for the login and such , but I’m running into a problem where the downloaded file is corrupting. Here’s the code I have: Here’s the error…

Extract link attributes from string of HTML

What’s the best way to extract HTML out of $var? example of $var I want example: preg_match(); what else? Answer Instead of crafting long complicated regex, do it in steps one way of “non regex”, using explode

Php SQL Server table value parameter

I am using php against SQL Server 2008 using the mssql driver. Anyone know of a way to pass a table value parameter into stored procedure? Answer Table-valued parameters are not yet supported by the PHP MSSQL Driver. You’ll have to try something else, like converting your TVP into XML and passing it as …