php5

Code for downloading video files

I am working on a project and was wondering how the code for downloading video files is like. I have an idea but it is half of the bigger picture.I am coding in php and jquery. I would appreciate the help. ...

Subrequest for PHP-CGI

virtual() can be used only when running PHP as an apache module. My shared hosting runs it as CGI so it doesn't work. Is there any other method to do it? Note: the subrequest is for static files that I'd like to let Apache serve (for performance, HTTP-headers caching, etc.). Right now this is handled by using an HTTP redirect (that I wa...

Advise needed on outsourcing the recording of unique views

I have an online image sharing platform based on PHP5 + CodeIgniter. I would like the application to show to the user the number of unique views per image. Users can access image pages anonymous or signed in. Although I know how to implement such a thing myself, I prefer to "outsource" the recording of unique pageviews, for reasons of p...

How to replace a js file path in my php page using PHP?

How to edit js/swf file path in my php page using PHP code. Path is not unique it is varying. I have to search these file path and replace it. Any body knows the solutions please help me. ...

PHP right search pattern of a char within a fixed length alpha-numerical string

Hi , I did a search but I didn't found anything . I'm looking for a pattern that will search in an alpha-numeric string (with the exact length of 7) the letter "P" . This is what I came up with until now , why isn't working ? $pattern = "/^[\wP]{7}$/"; Many thanks in advance ...

url rewriting using htaccess

hi i want to rewrite the url using htaccess in php ...

How to check whether $_GET['id'] is set and it's not empty using php

Here's a php code if(isset($_GET['id'])) { //do something } else { redirect('index.php'); //redirect is a function } Now if id is set (ex: index.php?id=12) then the action is performed but if id is not set (ex: index.php?id=) this shows an error, how to overcome this...?? How to determine id is an integer and it's not empty a...

php password protected website

Hi all, I'm new to web programing and im trying to find a few good examples / tutorials on how to do a decent job of creating a website that requires users to log on to view any pages beyond the main log in page. so far i've found 1 or 2 that ive tried but i keep running into the same problem. If i just enter the url of the page i wan...

Communicating between Mac OS X Preference Pane app and php5 web app

Wondering what the best method is for communicating between a 10.5/10.6+ System Preference Pane application to our php5 web application. The Preference Pane application that we've yet to develop will allow the client to authenticate to our online services, then allow them to control how their local client is backed up to our online back...

php error: Fatal error: Can't use function return value in write context in /home/fadnyc/public_html/newstudent.php on line 62

for ($i=0; $i<10; $i++) { if ($choices($i)) { if ($selection(0)=='first'){ $selection(0)= $choices($i); // line 62 } else{ $selection(1) = $choices($i); } echo "ctr " . $ctr . $choices($i) ."<br />"; } } ...

ufpdf in xampp 1.7.2

I used ufpdf to generate pdf files with Unicode/UTF-8 in PHP. It works properly in xampp 1.6.7 for windows. However, I tested it in xampp 1.7.2(window), it doesn't work and I got like that: "%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream x�3R��2�35W(�r Q�w3T06�30PISp �Z*�[��Y+��..." What shall I do? ...

generating class diagrams for php projects ( codeigniter framework)

hi guys, I'm developing a system using Codeigniter, and it's nearly completion, i didn't went for class diagrams first because it was hard to decide, so i straight away did coding and now i want to draw class diagrams for my project. do you guys know about a tool that i can use for generating class diagrams for my project? ragards, Ra...

Downloading BLOB file with Oracle and PHP

Using PHP, I'm trying to download a blob file that has already been uploaded to an Oracle 10g database. I've seen and imitated numerous examples I've found. When I access the page a File Download dialog appears allowing me to Open or Save. If I click Open, media player comes up as it should but never retrieves the file. If I choose Save,...

getting a value from the array in php

when i say var_dump($this->variables['DEFAULTS_VALUES']); I get the Following array array(1) { ["ABE LOB RPT"]=> string(8) "BEST2" } how do i get the value ["ABE BBB CCC"] from this array when i say in this way $this->variables['DEFAULTS_VALUES'][0] It says UNDEFINED OFFSET: 0 .how do i get the value ["ABE BBB CCC"] from ...

How do we Replace with the Hidden fields posted values in PHP

I have two hidden fields in the form (php) where these hidden fields are being replaced These hidden fields have the value from two text boxes. So we are getting the values directly from the textboxes in the action form <input type ="text1" name="text1" value=""> <input type ="text2" name="text2" value=""> <?php if(!empty($_POST['te...

Problem when sending mail with Zend Mail?

Hello, I'm trying to send an e-mail with ZendMail ( this simple script sums it up ) <?php require_once 'Zend/Mail.php'; $mail = new Zend_Mail(); $mail->setBodyText('My Nice Test Text'); $mail->setBodyHtml('My Nice Test Text'); $mail->setFrom('[email protected]', 'Mr Example'); $mail->addTo('[email protected]', 'Mr Test'); $mail->setSub...

fetch image from mysql via PHP

Hi.. I want to fetch blob datatype of images from MYSQL database using PHP and these images displayed in Iphone Uiimageview. can anybody post some PHP code to retrieve images from mysql. Thanks ...

How to perform addition of date which taken from database in PHP5 ?

actually I save date in database in varchar format. firstly I retrieve date from databae & store it into $date. now i want to perform addition of 5 days with $date1. when i search on internet i got this code : $date = date('Y-m-d', strtotime("+5 days")); now can you tell me how I insert $date1 value to this code for get expected res...

How to create virtual properties in Kohana 3 ORM

I have a timestamp field in a model where the time is stored in UTC. I would like like to create a 'virtual' property that allows me to access the model using local time based on the timezone property also stored in the model. That is when I get the local_started_at property it reads the started_at property and adjusts the value based ...

Does std Class in PHP creates a Hidden Fields for each property

$Var = new StdClass; if($_POST['somvar']){ $Var->somvar = $_POST['somvar'] } else { $somevar='' } Why is it creating hidden varaible for this statement "$Var->somvar = $_POST['somvar']" when i see the view source How do i persist the state of this variable when moving to next pages ...