php

PHP: get rid of '?p=' in url?

Possible Duplicate: Passing varible types though mod-rewrite howdy, I'm using the get method on my current project. my links refer to <a href='?p=". $path … and i'm getting there values with if(isset($_GET['p'])) … everytime i click a link the url in the adressbar changes to mydomain.com/?p=files/path/subpath i wonder if i ...

Can PHP handle splitting video

Let's say that I created a video with something like Camtasia and saved it as .avi. How would I go about programmatically extracting a subclip let's say from minute 1:00 to 1:50. Is this something PHP can handle? Edit: I don't mind using libraries, including ffmpeg if PHP can't handle it alone. But I'm not looking forward to something ...

PHP function help / beginner

Hello I need some help. Look, if forum post have $hide_smilies is set to 1, I dont want the :p, :o to be replacen with images. This is how I output forum post bbcode($message); And Function: function bbcode($str) { $str = htmlentities($str); $find = array( "/:p/", "/:o/", '/\[b](.*?)\[\/b]/is', '/\[u](.*?)\[\...

How to Convert to UTC

I'm getting dates & times from various sources (e.g. file's date/time from FTP server, email's date/tiem received, etc.) and need to store them all as UTC (so they all have a common reference). How do I do this? What pieces of information do I need in order to properly do the conversion. This is for a PHP web application. So, I can get ...

Newbie to regular expression

Hello, I have been reading about regular expressions for around a couple of hours and I still cannot get my head around this: I am trying to pull the anchor text from a link that is formatted this way: <h3><b>File</b> : <a href="/en/browse/file/variable_text">i_want_this</a></h3> I want only the anchor text for the link : "i_want_this...

Auto-complete search box, selecting multiple values from results

I'm creating my own recipe box using php/mysql and one part I'm stuck on is actually creating the recipes, specifically selecting the ingredients. What I wanted to do instead is have a auto-complete search box where I can type out names of the ingredients, have the results drop down right below, and click the ones I'm looking for. After...

Are there any languages that use PHP as a virtual machine?

Hi, I am wondering if there are any languages that extend PHP into something ahem "better"? They don't have to necessarily be able to interact with PHP, but it is certainly a benefit if they can (e.g. call PHP functions or even be called from PHP). ...

"Crawl" a page / site for keywords

Last year I dabbed in a bit of perl programming. The first thing I wrote was a simple script that took a web page and found out how many times a word or name was on that page. I refer to this as "crawling" is that correct?. I was wondering If this is a native process for other languages like PHP and ROR. Essentially I want to build my ow...

How can I find a single occurrence of a non-latin character using regular expressions?

I am using a regular expression to see if there is a single non-latin character within a string. $latin_check = '/[\x{0030}-\x{007f}]/u'; //This is looking for only latin characters if(preg_match($latin_check, $_POST['full_name'])) { $error = true; } This should be checking to see if there is at least one character pres...

I have a question about variable in PHP

i view a file source and see a variable . Ex : $varibale This file have any inlcude file . How i can find $variable outed from file ? What php function ? ...

PHP's ob_flush() causing error

When I call PHP's ob_flush() function on my localhost (via MAMP) I get the following error: Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush. The only solution I can find is to prefix it with @, but this doesn't seem like a real solution to me. What's causing the problem? ...

php/mysql newbie question

excuse the title but as im not an expericened programmer i dont know how to describe this problem So the problem. I have 2 topics in my topics table. When im on thread 2 it correclty prints a thread to thread 1 but when im on thread 1 it doesnt print the link to thread 2. Whats wrong? $prev_thread = mysql_query("SELECT MAX(id) as pre...

PHP: small FTP browser?

hi guys, i need your help/tips and tricks and foremost an approach on how to start with my little project. I'm trying to build kind of a little ftp browser. all files (and folders) in a specific folder on my ftp-server should get listed underneath. if there is a file and i click it, a download prompt should be triggered. if i click on a ...

Can do procedural PHP, want to do JavaScript, need to do OOP PHP first?

Here's a bit of a twist on the old which do I learn first question you've read a million times before... I began learning PHP last fall and feel I have become fairly competent in procedural PHP programming. As my site - the driving reason for these studies - has developed I've reached a point where learning OOP PHP would make for clean...

an addition needed in highslide js

Iam using highslide js for my image blow up section and its working fine. But now i need that once an image is clicked and is blown large then if a person clicks anywhere on the page except that image then the image should get back to its original self i.e. blow up should get removed.You can check it here http://highslide.com/ Even on or...

Is PHP serialization a good choice for storing data of a small website modified by a single person

Hi, I'm planning a PHP website architecture. It will be a small website with few visitors and small set of data. The data is modified exclusively by a single user (administrator). To make things easier, I don't want to bother with a real database or XML data. I think about storing all data through PHP serialization into several files. ...

Upload a file using Html

Hi, I am new to this.please help me out how to upload a file using html and php.please help me out with some examples.Thanks in advance. ...

PHP: mkdir on buttonclick?

hi guys, i sort of want to create a little backend of a small website. i wonder how i make a button that creates a folder on my server? mkdir should work! however how can i trigger the mkdir event on a buttonclick? ...

php code to insert data into xml file

Hi I am trying to insert data into xml file. For Ex: <list> <activity>swimming</activity> <activity>running</activity> </list> In place of swimming i want to insert different data(ex:jogging) How can i do that? ...

PHP MySQL Query most popular in last 24 hours

Say I want to get ten records with the MOST likes in the last 24 hours. Here's what I have so far: $date = date("o-m-d"); $query = "SELECT date_created,COUNT(to),from,to FROM likes WHERE date_created LIKE '$date%' GROUP BY to ORDER BY COUNT(to) DESC LIMIT 10"; The problem with that is that it only gets the most liked from THAT DAY, no...