php

How to create a pdf with a colored border

I need to create a pdf using the fpdf class with a colored border that is 15mm thick on the top, right and left and 32mm thick at the bottom (border color is orange for the sake of argument) which leaves a white background in the middle for the text content. How can I best achieve this please ? ...

Framework/tools for rapid development of niche social networking site?

What kind of framework/tools do you guys have experience with that are useful for rapid development with limited resources of a niche social network that doesn't have to scale too much? Preferably in PHP base. ...

Why not to use Array of errors instead of Exception Handling !?

Why not using array of errors instead of throwing errors and check if it's not empty later in the code.... Exception handling is very confusing to me , I can not understand it's purpose ... can anybody enlighten me !? they compare it with die() as better not to stop the execution of the code , why would I stop the execution of code if ...

Delete all lines that doesn't contain a specific word in php

i need some code which can delete/filter arrays which doesn't contain a specific word or we can say keep only that contain a specific word and drop all other ones which one use less resource ???? update : the correct answer to my problem is <?php $nomatch = preg_grep("/{$keyword}/i",$array,PREG_GREP_INVERT); ?> Notice the PREG_...

Is it possible to read from Mercurial repository using PHP

Hey Everyone, After trying to get the mercurial repository explorer setup on my shared hosting with no luck, I have decided to try and write a module for our Intranet that will act as a repository explorer. Is it possible for me to get changesets from a Mercurial repository without Mercurial installed on the machine? Thanks for any h...

Complex SQL query... names of returned variables

Excuse me for what I'm sure is an elementary question for most of you, but I have an issue with table columns from separate tables having the same name as one another, and trying to select from both tables in the same query. Okay, so this is my code: $q_value = $mdb2->quote($_POST['query']); $field = $_POST['field']; $sql = "SELECT m.*...

PHP queue jobs in centOS

I wrote a PHP shell script which include queuing jobs in centOS with 'at' command. The queue jobs may vary in time and contents which means the system need to keep quite a large number of jobs. The application logic will also be a bit difficult to setup with cronjob. Is there a limit in number of queue jobs in centOS or is there any alte...

emails not going out to all users

I have a few scripts that send out emails to my users, and for some reason not all users are getting the email. The site is not live yet, so its no big deal yet but I dont understand why. I have set up a few fake accounts, one with my school email, one with hotmail and one with yahoo. When I sign up with my school email I recieve the wel...

php xml attribute value replace

Say i have an xml file of this nature some data I wan to replace attributes of each later using one function in php: example say: replaceAttribute("collections","somecollection,"newcollection"); ...

how to protect client side codes...

is there any open source tool to encrypt or hide the client side code.... is it possible....??? i need to encrypt php,html,java script// ...

How to create thumbnail from swf games?

Hi I know there is way of creating thumbnail from swf video files using ffmpeg to take snapshot, but is there any way out there to create thumbnail from swf games files? ...

PHP on Windows: Apache or IIS7?

Here's the thing: Due to a new project, I have to learn PHP from scratch. I'm now in windows and I DON'T want to change quickly, so, don't tell me to change. I need to setup a DreamWeaverCS4/PHP5 develop environment, and, I don't have a clue whether to use Apache or IIS7. I just need some advice relating to it. Remarks: I really don'...

Blue pay integration in php

Hai, I want to integrate Bluepay gateway in my project, I have download a Bluepay.php class but i don't know how to configure this file with my project? Please any one tell me the basic steps to implement bluepay payment service? ...

PHP regex help with preg_match_all

Hi, I am trying to refine a preg_match_all by finding the second occurrence of a period then a space: <?php $str = "East Winds 20 knots. Gusts to 25 knots. Waters a moderate chop. Slight chance of showers."; preg_match_all ('/(^)((.|\n)+?)(\.\s{2})/',$str, $matches); $dataarray=$matches[2]; foreach ($dataarray as $value) { echo $val...

Is there a way to make PHP progressively output as the script executes?

So I'm writing a disposable script for my own personal single use and I want to be able see how the process is going. Basically I'm processing a couple of thousand media releases and sending them to our new CMS. So I don't hammer the CMS, I'm making the script sleep for a couple of seconds after every 5 requests. I would like - as the ...

500 internal server error in joomla ckeditor

First of all thanks. I have installed ckeditor in my joomla and it's working fine, except the uploading section. I got an error message " 500 internal server errors The request was not completed. The server met an unexpected condition. mydomain/plugins/editors/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&CK...

Symfony/Doctrine: Unserialize in action vs template

Hi, Can anyone tell me why calling "unserialize" works fine in an action but gives an offset error in a template? It's basically possible to unserialize a database text result into a variable in an action and pass it to template, in which case it displays fine: $this->clean = unserialize($this->raw); <?php echo $clean ?> But not if ...

Run word on server for COM to work??

I got this from php.net website. This is related to the problem I am having with tho code below. Can anyone explain me what the following does. I am using Vista. What does running Word on server implies? In order to get the Word example running, do the following on the server side. Worked for me... 1. Click START-->RUN and ente...

How do we protect our Wordpress from hacker ?

it's can be apply not only to wordpress. But to all blog platform that can be installed into a server and shared host. so, What do you do via PHP coding or pluggin or any method to secure your installation ? ...

Password Validation

Hi there. Using mysql and php Is there any reason / value when checking a password to query the database using the user name and password (after sanitizing, of course) and recording a failed attempt when no rows are returned vs querying the database using the user name and then comparing the return password string? EDIT: To those who ...