php

Need Google Geocoding to return City name in English

Hi, I have this code for requesting google to correct the typed in address, and need it to return the English name for the city: function gmap_query_xml($in_address) { $base_url = "http://maps.google.com/maps/geo?output=xml&region=US&language=en&key=". KEY; $request_url = $base_url . "&q=" . urlencode($in_address); ret...

how to display all data from database to webpage in table format using php5?

hi guys i want to display all my data in table format i try following code but it gives error :" Fatal error: Maximum execution time of 30 seconds exceeded in C:\Temp\5Aug2010\test.php on line 35 " this is my code : <?php // Connects to your Database mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_se...

Wordpress, .htaccess and mod_rewrite: how can I add redirection rules?

At the moment, I have a standard installation of Wordpress 3.0, and the .htaccess file looks like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> I want to rewrite URLs so that I...

Is Levenshtein slow in MySQL?

Yesterday I had a question where people suggested I use Levenshtein method. Is it a slow query? Maybe I can use something else? ...

Program for printing

I want to write a program for printing stuff on a paper, roughly what commands or classes do i need to use in c++ or php to get me started ? ...

SimpleXML - add a new node using a namespace previously declared - how ?

Hello all, <epp> <domain:create xmlns:domain="urn:someurn"> <domain:name></domain:name> <domain:registrant></domain:registrant> <domain:contact></domain:contact> </domain:create> </epp> I would like to add a child, on a very specific place (so I'm also using DOM and not only simpleXML) for <domain:create> ...

How would you approach a PHP + MySQL anagram solver?

Does anyone have any ideas, links or algorithms for solving an anagram with PHP and MySQL. If anyone has a good English Dictionary that would be appreciated also. I am looking to achieve something similar to this: http://www.ssynth.co.uk/~gay/anagram.html The guy explains how he did it here http://www.ssynth.co.uk/~gay/anagabout.html ...

Display a page's elements as selectable (HTML/PHP)

Hello :) I am looking for a way to make all visible objects in a webpage selectable by a visitor. For example, I take google's homepage as source, my php script already gets the homepage, and stores everything in an array. Now I want to show the google homepage with every object (span, div, body, td etc...) selectable. My visitor wil...

passing php variables in query strings

I have a number of url's with different query strings such as view.php?id=5 view.php?id=6 view.php?id=7 on another php page Im using file_get_contents as below: $page = file_get_contents('view.php?id=5'); $file = 'temp/form.html'; file_put_contents($page, $file); This of course only writes the first id '5', so how can i retri...

jquery-ui vertical navigation menu using with themeswitcher.

Hello, I would like to have a vertical navigation menu compatibbel with jQuery UI ThemeRoller. How can I define the styles for my menu? I just build menus dynamically and php code is following: $menu = '<ul>'; foreach ($items as $val) { if ( 'sep' == $val['link'] ) $menu.=$val['label'].'<br>'; else { // echo $_SER...

Replace /upgrade libxml2 in xampp 1.7.1 linux

I have xampp 1.7.1 installed on linux, and i need to update libxml2 to version 2.7.3. Can anyone help me? I suppose that i need to recompile php but first i need to install libxml2 and i don't know how. Thanks in advance, ...

php stdClass : assigning object value to variable

Anyone know how to assign stdClass value to variable ? I have a stdClass object and when I print it using var_dump($userdetails->emailaddress) , it does print out the value as String(31)"[email protected]"; but when I try to assign the onject value to variable , let say : $to = $userdetails->emailaddress; the $to value become NULL ... ...

Facebook graph API & PHP SDK questions.

I have a couple of problems using facebook graph api. 1). When i try to upload a photo i get the following error "(#324) Requires upload file". $attachement = array( 'access_token'=> (...)', 'name' => 'uploaded foto', 'source' => 'C:\Documents and Set...

How to replace a js file path in my php page using PHP?

How to edit js/swf file path in my php page using PHP code. Path is not unique it is varying. I have to search these file path and replace it. Any body knows the solutions please help me. ...

RDBMS strategies for storing heirarchical lists? querying/outputting them?

I'd like to store a fair bit of text data with the following structure: 1. Overall Text A 1.1 Subsection Text 1.1.1 Clarification A 1.1.2 Clarification B 1.2 Another Subsection 1.2.1 Don't forget A 1.2.2 Don't forget B 1.2.3 or C! 2. Overall Text B 2.1 getting the idea yet? Section levels would...

How can I use in .htaccess?

Hey, I want to change from this address: www.domain.com/game.php?id=1 to somthing like that: www.domain.com/game/1/THE-NAME-OF-THE-GAME-IN-DB How can I do it? And one more question: I want when the user goes to address which doesnt exists, for example if it doesnt exists: www.domain.com/game.php?id=9123912 - this ID doesnt exis...

Connecting Blackberry JDE with a php based server

Hi folks , I am new to blackberry application development.I am using Blackberry Eclipse... I am trying to connect blackberry JDE with an PHP based server.I have read many forums which says use of KSOAP ... I want to know that after installing KSOAP...where should i write php codings? PLEASE HELP... ...

XML Parsing Error

hi every one . here i am creating xml file dynamically at run time but i m getting error XML Parsing Error: junk after document element Location: http://localhost/tam/imagedata.php?imageid=8 Line Number 9, Column 1: ^ $id=$_GET['imageid']; $dom = new DomDocument('1.0'); $query="select * from tbl_image_gallery where imageI...

PHP Business days stop at weekends create a new start date on monday

Hi already i'm using this code from another question - which adds two extra days to endday in the case of weekends function add_business_days($startdate,$buisnessdays,$holidays,$dateformat){ $i=1; $dayx = strtotime($startdate); while($i < $buisnessdays){ $day = date('N',$dayx); $datex = date('Y-m-d',$dayx); if($day < 6 &&...

What does @ mean in PHP?

Possible Duplicate: What is the use of @ symbol in php? $result = @mysql_query("$query"); Why do we use @ here? ...