Affichage des articles dont le libellé est php. Afficher tous les articles
Affichage des articles dont le libellé est php. Afficher tous les articles

samedi 14 février 2009

Symfony et les slug

Petite reminder

Quand on veut gérer des slugs en symfony, si l'on veut pouvoir modifier le slug il faut déjà ajouter dans la conf un petite canUpdate: true

Ensuite dans la fonction qui permet de modifier le champs qui a été défini comme Sluggable ne pas oublier de faire un petit $object->setSlug($fieldValue) avant de faire un $object->save().

dimanche 29 juillet 2007

krumo

Version 2.0 of print_r and var_dump ... from simpleentrepreneur

jeudi 19 juillet 2007

tutoriel cURL avec PHP (5)

Cette article et la série de tutoriel a été déplacée ici:

Le Blog de Nico O - Tutoriel Curl

mercredi 18 juillet 2007

Tutoriel cURL avec PHP (4)

Cette article et la série de tutoriel a été déplacée ici:

Le Blog de Nico O - Tutoriel Curl

Tutoriel cURL et PHP (3)

Cette article et la série de tutoriel a été déplacée ici:

Le Blog de Nico O - Tutoriel Curl

dimanche 15 juillet 2007

Tutoriel cURL avec PHP (2)

Cette article et la série de tutoriel a été déplacée ici:

Le Blog de Nico O - Tutoriel Curl

lundi 9 juillet 2007

!php curl library

Libcurlemu : a drop-in replacement for php curl library
March 16th, 2007 by Jon Moffet

libcurl or php curl extension is a flexible multiprotocol client library widely in use in various PHP scripts. It can be use to access FTP,HTTP,HTTPS,DICT,TELNET,SCP and LDAP protocol.

libcurl is popular among PHP programmers because it support various HTTP methods which can be use to create web robot, crawler and auto-submitters by emulating a web browser.

However for various reasons, some web hosting company choose not to install php-curl extension and this will affect your php scripts which uses curl_* functions.

Solution :
To solve that problem, you can download and use libcurlemu, a pure PHP implementation of libcurl. By using this library, your php scripts is guaranteed to run regardless if php curl extension is installed or otherwise.

Adapting your scripts to php curl is simple, you only need to include "libcurlemu.inc.php" in your scripts, and everything will run as if the server has php curl installed. There are no further modifications required to use libcurlemu.

Example :
PLAIN TEXT
PHP:

1.
// first, include libcurlemu.inc.php
2.
require_once('libcurlemu.inc.php');
3.

4.
//... the rest of your scripts is under here, unmodified
5.
$ch = curl_init();
6.

7.
curl_setopt($ch, CURLOPT_URL,"http://www.mysite.com/tester.phtml");
8.
curl_setopt($ch, CURLOPT_POST, 1);
9.
curl_setopt($ch, CURLOPT_POSTFIELDS,
10.
"postvar1=value1&postvar2=value2);
11.
12.
curl_exec ($ch);
13.
curl_close ($ch);

libcurlemu will attempt to use the native PHP Curl extension before it switches to its own library, this will ensure that your scripts will run portably without any further modification when you ported it to a server with PHP curl extensions installed.

Tags: php, curl, libcurl, library, extensions

Tutoriel cURL avec php 1/5

Cette article et la série de tutoriel a été déplacée ici:

Le Blog de Nico O - Tutoriel Curl