php

Storing frequently accessed data in a file rather than MySQL

I'm working on a PHP content management system and, in testing, have noticed that quite a few of the system's MySQL tables are queried on almost every page but are very rarely written to. What I'm wondering is will this start to weigh heavily on the database as site traffic increases, and how can I solve/prevent this? My initial thought...

PHP GraphViz Documentation

Has anyone used graphviz-php and if so do they know where I can find any documentation regarding its usage/class structure etc? Please note that this is the graphviz-php not the pear (image_graphviz). Thanks ...

How can I control the placement of the comments region in Drupal 6?

I'm developing a theme for a Drupal blog; the mock-up I created requires the post content, trackbacks block and comments block to appear in a central column, with borders running either side. I've got the CSS and HTML working correctly, so that's not the issue here. My problem is that the comments block as generated by Drupal is plac...

Does anyone know a SSH/ SFTP/ FTP wrapper around pfsockopen()??

Does anyone know a SSH/ SFTP/ FTP wrapper class around pfsockopen();?? I'm still on my quest to keep persistent connections in PHP. ...

is there a way to define a constant array in PHP

hello. is there a way to define a constant array in PHP? ...

Form Helper: Any other benefit?

Hello all, I am new to codeigniter and I have just created a test login system. Chuffed... I would like to make a form for this login system as I have just been passing the username/password directly for testing. I am trying to work out the benefits of using the form helper. It helps me contsruct a form easily but can I not do this in...

Codeigniter preg_replace_callback

I would like for preg_replace_callback to use a library function from CodeIgniter as its callback. My current unsuccessful attempt is the following: $content = preg_replace_callback('/href="(\S+)"/i', '$this->util->url_to_absolute("http://www.google.com","$matches[0]")', $content); But I haven't had any success. I've tried usi...

Contact Page not showing correctly in Google Chrome Broswer

I have a one-page portfolio style website that scrolls with JQuery, and I cannot get the "Contact" page to show up fully in the Google Chrome Browser. It works fine in IE, Safari, and Firefox, but not in Chrome. I have attached the code for the "Contact" page to see if someone can see what is wrong. To view the site and see the problem, ...

(PHP) How to destroy the session cookie correctly?

I'm trying to correctly log out of an admin user. Here is my function: function logout() { $_SESSION = array(); //destroy all of the session variables if (ini_get("session.use_cookies")) { $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params["path"], $params["do...

PHP limited by filesize saving a blob in oracle

Hi, I'm using a php script to save a binary stored in the server's temp directory into oracle as a blob. It works fine for filesizes < 7MB, any larger than that and it just doesn't save. The php post and file upload limit is 32MB. The script stops completely at lob->savefile($tempFile). The general code is below: $stid = oci_parse($con...

What web-service can I use to send MMS from my web app?

I am looking for a web service API that I can use to send MMS messages. Most web services like Twilio and TextMarks only support SMS. I am looking for a similar service that supports MMS. Are there any out there? ...

Large Forms = Large PHP/mySql Query Strings... Is There a Good Solution?

I've got a CMS I'm building where I've got a rather large form full of data to add to my database. This is where I collect my variables.... $orgName = $_POST['orgName']; $impact = $_POST['impact']; $headline = $_POST['headline']; $content = $_POST['content']; $subContent = $_POST['subContent']; $meterText = $_POST['meterText']; $mont...

PHP Form Adding Variables For "Shopping Cart"

I have this code in my HTML form: <form action="cart.php" method="post"> <input type="hidden" value="1" name="sample_" id="sample_"> Sample Bottle <br /><input type="submit" value="Add to Cart" name="sample"><br /> </form> <h1>Cart Total: $<?php echo $cart; ?></h1> And then in the referenced cart.php file I have: $cart =...

why i dont receive my post values of text box

hi from these for loop iam using javascript to calculate the total of mark1,mark2,mark3 and the average of the total... <input type="text" name="tblRowCount" id="tblRowCount" /> <table align="center" width="100%" border="0" class="table_Style_Border" id="table"> <input type="text" name="txtrowcount" id="txtrow...

captcha refreshing with refresh button

hi friends, I am developing a website with php, i'm also using javascript in it. I have to refresh captcha in my website with a refresh button when a captcha is unreadable to a user. how can i do this. please share any idea or codes to me Thanks ...

Pass data in URL without using GET

I have a page that displays information for a selected member. Right now, I choose select the member in the URL using GET data like so: Page/index.php?Member=member1 I see websites that do it like this: Page/member1 Is this possible to do with only one PHP file? ...

pass line breaks in text area input

I have a textarea input on a form for users to submit their snail mail address. This is the code I have <textarea name="Mail" rows="4" ></textarea> I would like for the line breaks in the text area to be passed in the POST data so that the address will appear properly in the code echo $_POST['Mail']; ...

Drupal API: how to load a module dependency from another module

I am attempting to develop a Drupal module that defines the class MyFeedsSyndicationParser. This class extends the class FeedsSyndicationParser from the Feeds module. In my module's .info file the dependency on the Feeds module is identified. When I enable the module the php_error.log contains: PHP Fatal error: Class 'FeedsSyndication...

ensure that uploaded file is image in PHP

Is there a good method for making sure that an uploaded file is an image in PHP? ...

ajax refresh code

hi, I need some ajax code to assign value to a session for example $_SESSION['verif_code'] i am generating a random number to assign value to this session i need some ajax code to refresh this random number function and assign value to this session. does any one have an idea please share it with me Thanks ...