Is it even possible? I am implementing an export to pdf functionality for a pile of data, one of which is a Google map with a marker. Thank you. Answer I think you are looking for this: http://code.google.com/apis/maps/documentation/staticmaps/ you just need the url and the google api returns the google maps excerpt as a png file
Replacing accented characters php
I am trying to replace accented characters with the normal replacements. Below is what I am currently doing. $string = “Éric Cantona”; $strict = strtolower($string); echo “After Lower: “….
How to enforce a http 403 or 404?
Is it possible to kind of force a 403 or 404 error? I have a kind of admin page, where I am trying to prevent hackers from getting into my filesystem on my server. (the path get’s delivered over the …
How to remove numbers from a string with RegEx
I have a string like this: I would like to remove 23 so I’m left with PM or (with space truncated) just PM. Any suggestions? Needs to be in PHP Answer
How to insert element into arrays at specific position?
Let’s imagine that we have two arrays: $array_1 = array( ‘0’ => ‘zero’, ‘1’ => ‘one’, ‘2’ => ‘two’, ‘3’ => ‘three’, ); $array_2 = array( ‘zero’ => ‘0’, ‘one’ => ‘1’, …
PHP: Notice: Undefined index where the session variable is defined
I am making a registration system with an e-mail verifier. Your typical “use this code to verify” type of thing. I want a session variable to be stored, so that when people complete their account …
How do I increment a value with mysql update query (php)
I have a query that looks like this: I want to increment the value as easily as possible. I have tried: I don’t get error messages, but the value in my db does not increase either. Answer If you use the single quotes ‘, you’re telling the enclosed value to be interpreted as a string You were probably thinking about
Create link in PHP with Get Parameters
This page is quite configurable with different parameters. So, it may be called like: Now my question is, what is the idiom for generating a link to the current page but with one parameter changed? For example, I’d like to change foo to 5, what’s the easiest way to generate a link like: I can loop through and do it
NetBeans always shows warning: “The authenticity of host x can’t be established” after upload, download or synchronize
I’m currently using NetBeans 6.9 with the PHP plugin and a PHP Application from Remote Server project. However, every time I upload or download with it, I’m prompted with a warning that reads: The …
How do I tell how much memory / resources is my php script using up?
I am debugging my application here and basically in a nutshell – the application is dying out on my online server or maybe its my server dying out. But I have checked this application three different …