php

Can anyone suggest a good PHP parsing class?

I need a class, preferably written in PHP, C#, or Python, that can parse PHP and return a token tree. Can anyone suggest a good, accurate one? ...

Programmatically getting tags (keywords) from titles, descriptions and related items

Hi all, First I need to programmatically get tags (unlike what is done here on stackoverflow) from the titles and descriptions of my posts. I don't want commonly used words to appear in keywords. Is there an efficient way of doing this? After getting good tags, I would like to save them in MySQL DB. Now, how do I efficiently get rela...

Sort values inside an Array on PHP

Hello, i have this array on php: Array ( [googlewindow] => 1 [google] => 6 [kei] => 1 [uutntpzlfcewtgfer] => 2 [dbq] => 2 [kexpi] => 1 [kcsi] => 1 [e] => 8 [ei] => 1 [expi] => 1 [ml] => 1 [function] => 5 [khl] => 1 [es] => 1 [time] => 2 [return] => 1 [new] => 3 [date] => 2 [gettime] => 2 [log] => 1 [b] => 2 [d] => 2 [c] => 6 [var] => 5 ...

Serving images via `print fread(...)` is slow, what to do?

I have a dynamic thumbnail script I found laying around the web and tweaked a bit. One of the things I added was a caching mechanism. Whenever a new thumb is generated, it is saved to disk, and the disk copy will be used if the same thumbnail (with all the same options) is requested again. A snippet: // name of cached file $thumb_...

Copying a fresh Drupal installation

I'm working on a wamp development environment. I've created a new database and used it to create a new drupal installation at wamp/www/drupalsite. This installation is unmodified and doesn't have any extra modules added to it. What if I want to create an exact copy or this installation so I don't repeat the installation process. My gues...

Store geocode info from google maps into mysql

I am pulling an address from a database and plotting it in a map. However, if the marker is dragged to a new location, I need the NEW geocode at "dragend" to be stored in the database. any ideas on the simplest way to accomplish this? ...

PHP extension unable to load

I want to enable MySQL and Curl extension. therefore I uncomment the lines for enabling there extension into php.ini. Also added environment variables to PHP to C:\PHP and PHRC to C:\PHP Copied the dlls to system32 When i am opening php.exe , I am seeing the following error : Even tried to runing the code. it is throwing me this err...

Problem with HTML/PHP script in IE

I have a page where I want to display a form if the user clicked the url for that page, and well... This script below works totally fine in Firefox and Opera, but Internet Explorer (6 in my case) just shows a blank page. Although, when I refresh after visiting the page, it shows up fine. Deleting cookies etc from the browser doesn't solv...

I tried to write a Wordpress plugin, but I failed. ( short problem )

Hi , all I write a simple wordpress plugins .. it is for friend blogs , using wordpres 3 but I don't know where is the problem .. this is the code .. <? /* Plugin Name: RandFriendB Plugin URI: http://www.abosami.com Description: Show your frineds blogs .. Version: 1.0 Author: abosami Author URI: http://www.abosami.com */ load_plugi...

Newbie with PHP. Keep getting same database error even after I modified my source.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dbuser1'@'localhost This is probably something stupid, but I created some code to access my database from a PHP script but there was an error (dbuser1 doesn't exist) at the first run and now its stuck with the same error even if I change the username to anoth...

How to create a link to a sub category from a page that is associated with a parent category using MySQL & PHP.

How would I be able to display a url value from a sub category listed in my MySQL database that looks something like the example below? index.php?cat=category&sub=sub-cat-1&sub2=sub-cat-2&sub3=sub-cat-3 Here is the MySQL table. CREATE TABLE categories ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, parentID INT UNSIGNED NOT NULL DEFAULT...

How should I handle errors in Codeigniter application

Ok so again my question is kind of a best practices/techniques question so I'm assuming there will be a few different ways to handle this. So, to what degree should I factor in error handling? As an example, say I havee a basic function in my model which retrieves a customers record ie function get_customer($customer_id) { $this->...

World Clock API in php or in javascript..

hello, i just want to ask if where can we find the code that will display the world clock just like this one LINK that doesn't depend on my computer time.. is there any plugins for that? or a function that i can simply call.. ? any help will be much appreciated.. ...

PHP GD Trim Transparent Pixels from created PNG

I am currently working on a website and lately have been using GD with PHP to automatically create transparent images that consist of text for use with navigation, headers, etc on the website. It saves me a lot of time in Photoshop plus I can change the text on the buttons instantly when needed. Well I have hit a dead end here. I foun...

Parse and Stringify JSON in PHP 4

Possible Duplicate: php4 with json data Is there a library or class that provides parsing (JSON to PHP primitives/arrays) and stringifying (PHP primitives/arrays to JSON) for PHP 4? ...

send cURL post to be received exactly like form post

I am trying to send simple entries in a form using PHP cURL so the remote server that the entries go to receives them in exactly the same manner as if sent from the form. So far, the remote server accepts post from the form but not when sent by this PHP code. fopen and fsockopen etc. are set to off by the host (Yahoo) that I use so cUR...

PHP, IDE, MySQL, Curl API and apache installation

Is any installer which can configure PHP, IDE, MySQL,Curl API and Apache. my goal is to use Curl API using PHP. I am lots of trouble with manual installing. ...

How to count sub category level using PHP & MySQL.

I want to be able to count which sub category my new category is so i can give it its proper url value for example sub category 3 url value will be saved as &sub3=category Here is an category example. Web Design //parent category 0 Programming //sub-cat 1 HTML //sub-cat 2 Basics //sub-cat 3 SEO Networking The ...

php find external links and get data

Possible Duplicate: Finding and Printing all Links within a DIV I'm trying to make a mini crawler..when i specify a site.. it does file_get_contents()..then get the data i want.. which i've already done.. now i want to add code that enables it to find..any external links on the site it is on.. and get the data .. basically..i...

Wordpress how to change default behavior of Custom Field

I know that WordPress remembers previously used field names which then can be selected in the drop down list. But i want to change that behavior by introducing Name field into label and Value field into text field . Does anybody have any idea ? thanks. ...