php

Link to external URL in post title of RSS feed in WordPress.

I have it currently so that my post title links to an external URL using the following code in my index.php file. <h1><a href="<?php echo get_post_meta($post->ID, 'external-link', true); ?>"><?php the_title(); ?></a> <a href="<?php the_permalink() ?>"><small>★</small></a></</h1> I'd like to have the title of my RSS feed to do the same...

Loading CI controller in PHP on the same server

How can include CodeIgniter content in a regular PHP page on the same server but not part of the CI app? For example I'm am trying to load a header from CI into Wordpress. Whats the best way to include a CI controller (eg; index.php/mycontroller/header/) on the same server? ...

need a wmv php library

does anybody know a lib for handling wmv file, need to be able to grab a frame and show it ...

MySql: Select all entries with count...

Hey guys quick question, I have a query that I want to count all entries it finds, and select all so when I use while($row=mysql_fetch_assoc($query)){ it will list all entries. The problem I am encountering is that while, all the entries are successfully counted and the right number is listed, only the latest entry is select and listed w...

In PHP, is it possible to create an instance of an class without calling class's constructor ?

By any means, is it possible to create an instance of an php class without calling its constructor ? I have Class A and while creating an instance of it am passing file and in constructor of Class A am opening the file. Now in Class A, there is function which I need to call but am not required to pass file and so there is not need to ...

Problem with Zend Project

Hello, i write a script and it works perfectly, on my local server. I have uploaded it on my server and now I getting this Problem Parse error: syntax error, unexpected '{' in /homepages/46/d319011794/htdocs/suche/public/index.php on line 18 an here is my index.php <?php error_reporting(E_ALL || E_STRICT); define('APPLICATION_PATH...

IF statement + Jquery popup?

How would i go about having my site know lets say "IE User Visit's" and my site goes oh there on IE pop up lightbox or something. needs to support html. but say there on Mozilla or safari base browsers it just goes it because radius is supported by them ...

PHP: Safe way to store decryptable passwords

I'm making an application in PHP and there is a requirement that it must be possible to decrypt the passwords in order to avoid problems in the future with switching user database to different system. Consider that it's not possible to modify this future system's password method and I need plain text passwords in order to have the passwo...

How to handle media kept on a separate server (PHP)

So, I have three server, and the idea was to keep all media (images, files, movies) on a media server. I never got around to do it but I think I probably should. So these are the three servers: WWW server DB server Media server Visitors obviously connect to the WWW server and currently image resizing and cache:ing is done on the WWW s...

PHP - Checking Twitter username and password

Hey, I've been playing around with the Twitter api and I would need one more thing, that no tutorial covers .. Here si the code that I use to pick up data: $curlhandle = curl_init(); curl_setopt($curlhandle, CURLOPT_URL, "http://twitter.com/statuses/user_timeline.xml"); curl_setopt($curlhandle, CURLOPT_USERPWD, $username.':'.$pass...

SWIG generated code fails to run on PHP 5.3.2 undefined symbol: zend_error_noreturn

I have a library that I have been using successfully with PHP 5.1.6 with the help of some wrapper code generated by SWIG (v1.3.40). I have just upgraded to PHP 5.3.2 and I am seeing the following error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/myLib_php.so' - /usr/lib/php/modules/myLib_php.so: und...

Is it a good idea to Strtolower the username then store it in database?

Hi, In a php/mysql application where people can registre, is it a good idea to strtolower the username then store in the database in order to not have problems in the future? because people are using DiFfeReNt cases and i'm afraid that will make conflict in some queries. Thanks ...

PHP: Split multibyte string (word) into separate characters

Trying to split this string "主楼怎么走" into separate characters (I need an array) using mb_split with no luck... Any suggestions? Thank you! ...

Detect base64 encoding in PHP?

Is there some way to detect if a string has been base64_encoded() in PHP? We're converting some storage from plain text to base64 and part of it lives in a cookie that needs to be updated. I'd like to reset their cookie if the text has not yet been encoded, otherwise leave it alone. ...

How to make a PHP script that's pluginable ?

I'm creating my own script using the CodeIgniter MVC framework. Now, i want users to easily modify the site functionality and adding their own without modifying the code which i've already written. How do i make my site pluginable ? EDIT: The users would be the site admins. Not the end user. Basically just like drupal or joomla. Want t...

Joining tables from 2 different connection strings

Hello, I need to join two tables from different MySQL (PHP) connection strings and different databases. $conn = mysql_connect('192.168.30.20', 'user', 'pass'); $conn2 = mysql_connect('anotherIPHere', 'user2', 'pass2'); $db = mysql_select_db('1stdb', $conn); $db2 = mysql_select_db('2nddb', $conn2); If I were using the same connecti...

Create an RSS feed from Existing RSS

Im using the Twitter API to read the Favorites RSS, it generates the following output: http://vl3.co.uk/favs/getfavs.php I'm not sure why this file seems to be incorrect, doesnt come up in my RSS reader or render correctly in the browser. Can anyone shed any light on this? If the output is not valid RSS how can I make it so? Secondl...

How do I increment a variable so it chooses differnet lines from a text files in a While Loop.

I have a script im writing. Here is whats happening. There is a while loop. In the while loop is a variable which is constant to X. How do i make X change from line one, line two, etc for each cycle of the while loop and pull X from a .txt file. Everything is in root. Thanks ...

WordPress 2.9.2 htaccess curruption issue strikes again (in Patched site)

The htaccess file below crashed the site with an internal server error (500). This site has the misc.php patch that's discussed here: Wordpress Bug #11903 Apparently something else is at play here or the patch is not fully addressing the issue. 3 sites went down yesterday. 2 today (so far). All sites have the patch file that's referenc...

HTML Form Upload PDF with other form contents using PHP

I have a HTML form with fields such as name, address, notes, etc. I also have a field to upload a PDF. The uploaded PDF get's stored on the file system. How can I accomplish this if possibly the PDF files are larger than 2 MBs? Also, for some reason, the uploading of the PDF (< 2 MBs) works fine in Chrome, but not in IE. In IE, the ...