-
Double quotes in INI files loaded with parse_ini_file
Posted on March 1st, 2010 No commentsWriting a bit of PHP tonight and found that if you use parse_ini_file to load an INI file in PHP, there is a slightly hacky way of having double quotes in strings. For example, I tried these: somevalue = "This " "string" " has quotes" somevalue = "This " string " has quotes" But none of them worked! Turns out a quick look at the PHP manual reveals a simple (but a bit hacky) solution to this is to define a constant e.g. QUOTE to be “, and use that in the INI string
Read more from the original source:
Sphere: Related Content
Double quotes in INI files loaded with parse_ini_file
EU, File, James, ad, amp, asgrim, coding, config, double, escaping, exam, fine, fun, function, http, in, ing, ini, light, load, me, no, one, parse_ini_file, php, php5, quote, quotes, setting, simple, solution, string, to, ua, value, work, www double, escaping, exam, File, having-double, ing, setting, simple, work -
Announcing My New Website
Posted on February 8th, 2010 No commentsIt’s been live for a couple of weeks now, although I haven’t done much promotion of it, so here is word of an “official” announcement of my new portfolio site. Please take a look around and if you have any constructive criticism, feedback or advice, feel free to let me know through the usual channels… So without further ado, I pronounce www.jamestitcumb.com officially open!
Excerpt from:
Sphere: Related Content
Announcing My New Website
17, 5, James, ad, amp, coding, design, development, freelance, http, ice, in, live, me, new, no, one, open, promotion, site, titcumb, to, ua, web, website, weeks, word, www design, done-much, feedback-or-advice, feel-free, James, know-through, live, officially-open, promotion, the-usual, usual, weeks -
Question: How does source control work in a non-distributed environment?
Posted on February 5th, 2010 No commentsAt our company we currently all work on one shared network drive. The source code is not under any kind of source control, which for me is a big no-no. I’d love to be able to set up SVN and us all work of separate repositories and just commit back to a trunk or branch, but our tech manager doesn’t agree.
Continue reading here:
Sphere: Related Content
Question: How does source control work in a non-distributed environment?
17, CVS, Eclipse, File, James, OS, SVN, amp, auto, change, check, code, coding, commit, company, control, fine, form, http, ical, in, ing, int, issue, linux, me, network, no, not, one, open, open to suggestions, problem, repository, scm, share, solution, something, source, tech, to, tom, ua, update, vcs, version, windows, work before-it-takes, check, commit, linux, network, situation, source-control, tech -
Very Exciting – HipHop by Facebook
Posted on February 2nd, 2010 No commentsWell this evening Facebook have revealed what PHP developers globally have been speculating about and revealed their big secret . And boy, this could really change the landscape of PHP as we know it. I’m a great fan of compiling PHP for one reason or another, but I’ve never seen it reliably work.

Read the original:
Sphere: Related Content
Very Exciting – HipHop by Facebook
17, 5, Class, James, News, OS, RDP, Read, Search, Wordpress, Zend, action, ad, amp, apache, blog, book, box, change, code, coding, compile, compiling, convert, developers, development, early, engine, extensions, face, facebook, feature, form, forward, gap, gaps, get, hiphop, http, ical, image, in, ing, landscape, language, left, live, load, logo, magic, me, new, no, not, one, php, press, roadsend, send, site, table, test, title, to, twitter, type, ua, upload, user, variables, view, web, website, word, work, wp, www code, compile, development, from-the-php, ical, News, php, platform-which, variables -
MySQL gotcha when using non-compulsory foreign keys
Posted on January 27th, 2010 No commentsI’m just writing a query at the moment that filters out test records from a database. These records have a foreign-keyed value that identifies test apps, e.g. a table with: id name 1 TEST 2 ANOTHER_VALUE 3 SOMETHING_ELSE This is joined onto the main data table, sensibly with a query like this: SELECT * FROM the_data LEFT JOIN the_values ON the_data.some_value = the_values.id WHERE the_values.name != 'TEST' The gotcha is however, that this doesn’t work as you’d expect
Read more here:
Sphere: Related Content
MySQL gotcha when using non-compulsory foreign keys
17, Eye, IDE, James, SQL, amp, base, check, coding, data, database, filter, gotcha, http, in, ing, join, key, left, like, me, mysql, name, no, not, null, query, record, simple, solution, something, table, test, to, value, values, work amp, base, gotcha, identifies-test, instance, joined-onto, null, onto-the-main, query, record, simple, simple-once, table, work -
Write Stack Dump In PHP
Posted on January 21st, 2010 No commentsJust a quick one. You probably already use debug_backtrace (and if you don’t, use it!)
More here:
Sphere: Related Content
Write Stack Dump In PHP
-
cURL Tips – HTTPS requests
Posted on December 15th, 2009 No commentsToo many times have I seen this in cURL clients: curl_setopt ( $ch , CURLOPT_SSL_VERIFYHOST , false ) ; curl_setopt ( $ch , CURLOPT_SSL_VERIFYPEER , false ) ; Why is this bad? You leave yourself totally open to man-in-the-middle attacks, and makes SSL virtually pointless. Sure the data passed between the two servers would still be encrypted, but there is no way of verifying the server you’re talking to is the server you WANT to be talking to! My recommendation is that you verify the server is genuine by checking against the genuine CA certificate in PEM format.
See original here:
Sphere: Related Content
cURL Tips – HTTPS requests
17, 5, BT, IDE, James, OS, Read, Top, URL, ad, amp, api, blog, cURL, certificate, change, check, client, coding, data, form, format, fun, function, host, http, https, in, ing, int, internet, less, like, me, name, no, one, open, php, problem, request, server, servers, site, ssl, talk, time, to, tutorial, ua, verifyhost, verifypeer, virtual amp, check, cURL, fwo, internet, leave-yourself, open, passed-between, php, problem, Read, talk, tutorial, verifypeer -
Semantic Markup – What should h1 Be?
Posted on December 11th, 2009 No commentsI had an interesting argument earlier today. One of our websites is being redesigned at the moment, and the page layout has the logo and company name at the top, and below the menu is a subtitle
View post:
Sphere: Related Content
Semantic Markup – What should h1 Be?
17, BT, CSS, HTML, James, OS, Top, Touch, ad, amp, coding, company, day, design, developers, development, get, h1, h2, header, home, http, ice, import, important, in, ing, int, layout, light, like, logo, markup, me, name, no, not, one, page, rest, semantics, site, something, sub, title, to, view, web, website amp, CSS, HTML, import, important, important-thing, int, layout, light, rest, thinking-before, view -
Importance of User Agents
Posted on December 9th, 2009 No commentsWhen you write something that connects to a web server, what user agent do you use? Far too often have I seen things like: curl_setopt ( $c , CURLOPT_USERAGENT , "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" ) ; In my opinion you should always use a nice descriptive user agent that explains to the server exactly what your client may be trying to achieve, or at least a unique identifier
Continued here:
Sphere: Related Content
Importance of User Agents
17, 5, Google, IDE, James, OS, Read, Search, Top, Track, URL, ad, agent, amp, api, browser, cURL, client, coding, contact, data, e-mail, email, exam, get, help, http, https, ice, identify, import, important, in, ing, less, like, live, mail, me, media, message, new, no, not, one, oop, page, ping, post, request, script, server, servers, service, something, spam, string, term, to, trac, ua, user, user agent string, web, website, when, windows, www browser, coding, import, important, live, media, Read, user agent string -
Job Requirements
Posted on November 25th, 2009 No commentsThis won’t have been the first time I’ve written about degrees … But I recently noticed a job posting for a server-side developer at Headscape , and in just the third sentence it already got my back up: We are looking for a graduate who is passionate about the web This sort of thing in job postings really annoy me. The notion that a degree makes a person better than someone with 3+ years of experience to me is a very narrow-minded way of thinking

Read this article:
Sphere: Related Content
Job Requirements
17, 5, Class, ICO, IDE, James, News, OS, Program, RDP, Read, Someone, Technology, Touch, Wordpress, ad, amp, chance, coding, degree, developers, development, early, experience, first, get, http, ical, ice, image, images, in, include, ing, job, language, like, live, me, medical, money, new, no, not, one, personal, post, posting, press, programming, requirements, sentence, server, smile, software, time, to, university, view, web, word, world, wp, www Class, ical, industry, ing, James, money, News, press, smile, Technology, university












































