How to find Free world city database in mysql [closed]

Does anybody know where I can find open source world city database that includes: city names in different languages region / state / province country IP address range longitude / latitude

PHP state machine framework

I doubt that is there any state machine framework like https://github.com/pluginaweek/state_machine for PHP. I’ve had to define many if-else logical clauses, and I would like something to help make …

PHP format bytes translation to Javascript

Not really a question but kind of a challenge.. I have this PHP function that I always use and now I need it in Javascript. function formatBytes($bytes, $precision = 0) { $units = array(‘b’, ‘KB’…

How to disguise your PHP script as a browser?

We’ve been using information from a site for a while now (something that the site allows if you mention the source and we do) and we’ve been copying the information by hand. As you could imagine this …

multiple buttons on a form

I have a clear button that I want to tie into some php coding. how do I detect if the clear button is pressed. When the user press clear, i’m going to have it update a sql table to clear out entries. …

A numeric string as array key in PHP

Is it possible to use a numeric string like “123” as a key in a PHP array, without it being converted to an integer? $blah = array(‘123’ => 1); var_dump($blah); prints array(1) { [123]=> …

What’s the fastest way to find and replace in PHP?

I need a way of replacing some variables within a passed string. Example: I pass through “#fname# jumped over the tall wall to get his phone with the number #phone#”. I need the string to be …

Curl request is failing on the SSL?

I have this code if(ereg(“^(https)”,$url)) curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false); // execute, and log the result to curl_put.log $result = curl_exec($curl); $error =…

pdf download html2pdf

i am using html2pdf class to generate pdf. in my problem its generate pdf for the html code but it not give the dialog box option to download that pdf. plz help my cose is following. <?php …

How can I get specific value in array

I will explain clearly $array = array(“1″ => array(0 =>”aa”,1 =>”bb”, 2 => “cc”,3=>”dd”), “2” => array(0 =>”aa1″,1 =>”bb1″, 2 => “cc1″,3=>”dd1”)); In …