php

Having a Link Only Appear If a Logged-In User Appears on a Dynamic List

Hello, For the function below, I would like the link <div class="footervote"><a href="http://www...com/.../footervote.php"&gt;Vote&lt;/a&gt;&lt;/div&gt; to only appear if the logged in user currently appears on editorlist.php. (I. e. if the loginid in the function corresponds to any of the usernames that currently appear in editorlist....

php str_replace and \b word boundary

Hi, I am trying to use str_replace, but can't figure out how to use \b for word boundary: <?php $str = "East Northeast winds 20 knots"; $search = array("North", "North Northeast", "Northeast", "East Northeast", "East", "East Southeast", "SouthEast", "South Southeast", "South", "South Southwest", "Southwest", "West Southwest", "West", ...

Codeigniter's URL Rewriting Problem

I’ve using the following htaccess script so that i can hide index.php from the uri. RewriteEngine on RewriteCond $1 !^(index\.php|resources|assets|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] But i’ve facing a major problem :( I’ve a directory named asset...

Twitter like gmail and yahoo mail contacts import in php....

I am using php codeigniter and i am trying to import my contacts from my gmail and yahoomail exactly like twitter... I dont know how to get started? Any suggestion? ...

Does deleting temporary symlinks interrupt current downloads/access to that symlink?

I am using symlinks generated in PHP. They are generated when someone requests a download, and I want them to expire at the end of each day. The problem is, what if someone starts downloading a symlink 1 minute before the end of the day and then I delete the symlink while they are downloading it... My question is, to your knowledge wil...

Perfect Hash Function for URLs

Does anyone know of a perfect hashing function for URLs with 64-bit integers that would perform well for most URLs? ...

i do have a problem in importing the gmail contacts to my page?

Hi I am trying to import the gmail contacts to my page but there is an error called Curl function is undefined ..How to solve this problem ... And Is there any way to import the yahoo mail contacts? ...

How to show only last tweet of mine using PHP?

How to show only last tweet of mine using PHP, without javascript? I want to show my own last tweet on a web page. in this output <p>Add a comment to your closing DIV tag – it could save you hours <a>http://ping.fm/venna&lt;/a&gt; <span>8:25 AM Apr 15th</span> </p> ...

Can I include a view in Kohana 3 that is not within `application/views`?

I am building a staff area for a website, which is completely different to the main brochure style site. I have 2 Kohana systems setup. I realise they can both share the same system and modules folder. Now, with the second one, I want to make the main template view a view in a different folder. I tried this in my base controller $thi...

function with array variable

How do I pass an array through a function, for example: $data = array( 'color' => 'red', 'height' => 'tall' ); something($data); function something($data) { if ($data['color'] == 'red') { // do something } } how can I get the function to recognize $data[color] and $data[height]? ...

What is Scriptol?

While searching I came across this. It looks interesting but I have absolutely no idea of what it's for. I like it because you can compile to php, a language I don't enjoy a lot that's really useful. This could be a way I can use php without touching it. The language is odd looking, is there anyone out there who has tried it? Thanks ...

Separation of logic from presentation: HTTP variable names?

Hello all, This could probably be considered an academic question, rather than a real world one - but throwing it out to see if anyone has any great ideas! We all know that keeping the business logic of an application separate from the presentation is a good idea (I'm looking at web-apps atm), but there needs to be an understanding betw...

What happens to a class in PHP once its been instantiated?

Hi I'm just playing around with some PHP and was wondering what happens when an object from a class is created within another PHP script? I assume once its created and been processed their is no way of then going back and 'playing' around with it from another script? The idea is i'm trying to create a kind of deck of cards using a car...

Possible to view PHP code of a website?

Is it possible to somehow view another websites php files/codes? Or to rephrase the question, Can my php codes be viewed by anybody except for those who have access to the file? If so, how can I best prevent this? Thanks Ps: Server OS is Ubuntu 9.10 and PHP version is 5+ (Apache2) ...

Twitter Oauth login in a cron agent executing PHP file evenry 2 minutes

Hello, I'm using Twitter Basic authentification in a CRON agent to get et savelist of tweets in SQL db of 5 of my twitter account. Because we have to use Oauth after June 30th I'm searching to know how can I use oauth without connecting me manually. In fact I don't have user interface in my PHP file executed every 2 minutes. Thanks in ...

show data from database inside textarea

how to show data from database inside text area.... ...

Save PHP variables to a text file

I was wondering how to save PHP variables to a txt file and then retrieve them again. Example: There is an input box, after submitted the stuff that was written in the input box will be saved to a text file. Later on the results need to be brought back as a variable. So lets say the variable is $text I need that to be saved to a text f...

How to override a user profile view,, in our own plugin, in elgg

I have created a new plugin named 'adv' in my elgg site. And in this plugin iam listing the users.Which using the view from other elgg plugin 'profile ie the page profile/views/default/profile/listing.php. Now i need to set a link in the existing view of each user.So i have to edit the profile plugin , mainly the page profile/view...

uninstall pear in wamp

By mistake i installed PEAR , I thing i installed very wrongly, Now i want to uninstall only PEAR , Tell me How to uninstall PEAR IN WAMP.. (For Localsystem) ...

I need a regex to return true for 01.mp4

I want to sort out specific files depending on their names, i want a regex that returns true for file names like : 01.mp4, 99.avi, 05.mpg. the file extensions must match exactly to the ones that i want and the filename must start with characters which can not be longer than 2 characters. the first part is done but the file extensions ar...