Posts Tagged ‘PHP’
OJS (Open Journal System) OAI export MARCXML: Removing empty lines
In my previous post I explained how to show author email using OJS. I just noticed that some records were showing empty tags, like: <datafield tag="653" ind1=" " ind2=" " > <subfield code="a" ></subfield> </datafield> You can change OAIMetadataFormat_MARC21.inc.php to avoid it. More precisely, look for the formatElement function and change it to (notice changes [...]
Vufind: delete imported records
Vufind admin panel (http://www.yourhost.com/vufind/Admin/Home) allows to delete records by id (it calls Records.php, and more precisely the deleteRecord method). But if you want, for instance, to delete all records from a bad import you can do it directly from your system prompt using util/delete.php script: The first parameter is the import file name and the [...]
PHP: check if url exists (or file via url)
If you want to check wether a file exists or not, and this file has a public URL, you can use the following PHP code to check its existance. function url_exists($strURL) { $resURL = curl_init(); curl_setopt($resURL, CURLOPT_URL, $strURL); curl_setopt($resURL, CURLOPT_BINARYTRANSFER, 1); curl_setopt($resURL, CURLOPT_HEADERFUNCTION, ‘curlHeaderCallback’); curl_setopt($resURL, CURLOPT_FAILONERROR, 1); curl_exec ($resURL); $intReturnCode = curl_getinfo($resURL, CURLINFO_HTTP_CODE); [...]
vBulletin and forms: parameters via post or get
Imagine you’ve got a vbulletin forum running in your site. Lets suppose you want to add a new form to your forum. How does vbulletin deal with parameters? You can see the official documentation here. I prefer to explain things with an example, so lets go for it. I will take for granted that you [...]
Configure php-imap redhat [solved]
If your web server uses PHP and you need to use IMAP take a look at this post. When do i need to install IMAP support for PHP If you want to use imap_open function you need to do it. How do I check if my PHP is actually configured to use IMAP? Two ways: [...]
OSTicket: open source support / ticketing software with POP / IMAP
osTicket is a widely-used open source support ticket system. It seamlessly integrates inquiries created via email, phone and web-based forms into a simple easy-to-use multi-user web interface. Manage, organize and archive all your support requests and responses in one place while providing your customers with accountability and responsiveness they deserve. osTicket is configured by default [...]
WAMP and DRUPAL: “Deprecated: Function ereg() is deprecated in C:\wamp\www\includes\file.inc on line 902″ [SOLVED]
WAMP is a great tool for developing websites in your localhost. Suppose you want to install Wampserver 2.0i version and then DRUPAL 6.15. Well, Wampserver 2.0i by default uses php 5.3 and DRUPAL needs a php 5.2 version (or lower). You will notice some problems if you try to install out-of-box Drupal 6.15 in wampserver2.0i [...]
dfgallery: Invalid cURL response. We expected ‘true’ from the url …
I am going to install dfgallery 2.0 as it seems to be one of the best flash image gallery softwares available for free. Before the installation I was already using mod_rewrite. A lot of people is getting this error when trying to install df gallery 2.0: Invalid cURL response. We expected ‘true’ from the url [...]
Montar unidad remota con SAMBA en linux RedHat5 (desde PHP)
Estos días pasados he estado peleándome con lo siguiente: necesitaba que un programa en PHP (ejecutado en máquina llamada RH5, que corre sobre un Red Hat 5) fuera capaz de montar una unidad de cd/dvd remota (más en concreto, de un equipo local Windows XP SP3). Os comento, un poco por encima, los pasos a [...]
Parse XML file into array (PHP)
Nowadays XML-based information storing is increasing its use, so usually you’ll have to parse these files. If you want a PHP function that resolves these needs, take a look at this: <?php /** * xml2array() will convert the given XML text to an array in the XML structure. * Link: http://www.bin-co.com/php/scripts/xml2array/ * Arguments : $contents [...]