php

The Best solution to sending emails to group members in a social network.

I'm developing a social network in php. There is a feature to create custom groups by members and i want to enable the owner of the group to send emails in bulk to all group members. And most importantly i want to make sure that most mails are not going to end up in users' SPAM list. I'm using PHPMailer in my website What should be ...

Good way to keep PHPBB3 boards secure from hackers ?

Keep hearing of other forums getting hacked. I realise that if a hacker is that determined, they will find a way, but what are the actions that you can take to try to ensure, wherever possible, that it doesn't happen please ? ...

Reorder a multidimensional array?

I have the following array, I need to reorder it by average rating descending. Here is a snippet. Any idea how I would go about doing this? Thanks Array ( [0] => Array ( [id] => 3 [name] => [rating] => 0 ) [1] => Array ( [id] => 2 [name] => ...

mySQL to XLS using PHP?

Hi guys, how can I create a .XLS document from a mySQL table using PHP? I have tried just about everything, with no success. Basically, I need to take form data, and input it into a database, which I have done, and then I need to retrieve that table data and parse it into a microsoft excel file, which needs to be saved automatically on...

How to work with big numbers in PHP?

How to work with big numbers in PHP? such as (6*27^0+17*27^1+11*27^2+18*27^3+25*27^4+4*27^5)^65537 ...

$ajaxForm reply back from processing page using jquery and php

Hello, I have a page called guestbook.php in which contains $('#guest_form').ajaxForm({}); When the form is triggered it goes to a save.php page which contains and values inserted if($_POST['x']){ $xx = $_POST['x']; $yy = $_POST['y']; $zz = $_POST['z']; $query_one = "INSERT INTO xxx (x1,yl,z1,z2) values ('$xx','$yy','$zz','00000...

maintaining continuous count in php

I have a small problem maintain a count for the position. i have written a function function that will select all the users within a page and positions them in the order. Eg: Mike Position 1 Steve Postion 2.............. .... Jacob Position 30 but the problem that i have when i move to the second page, the count is started from first E...

Push a variable into global scope?

We use instantiate and put system critical objects in $GLOBALS for easy access from anywhere (e.g. DB, Cache, User, etc.). We use $GLOBALS so much that it would (yes, really) drop the amount of code quite a bit if I could reference it like $G = &$GLOBALS for a shorthand call. The problem is that, per my experience and several hours of ...

keep an authenticated user across servers

Hello, In a LAMP environment, if a user authenticates itself on example.com domain, hosted on server1, how can i keep him logged in on forum.example.com, hosted on server2 ? Thank you in advance for your advise. ...

GPG system call in PHP

I need to append my public key (which is in a variable) in pubring of .gnupg using the system call in PHP. What system call is available for this? $gpg = system('gpg --recipient userid --output outfile.asc --armor --encrypt hello.txt', $retvalue);//calling gpg encrypt command using system call echo ' Output: ' . $gpg . ' Return value:...

Connecting to two databases

Hi, I have an application in which I want to authenticate a user from a first database & manage other activities from another database. I have created two classes. An object of the classes is defined in a file: $objdb1=new db1(),$objdb2=new db2(); But when I try to call $objdb1->fn(). It searches from the $objdb2 & is showing table1 ...

OSCommerce checkout success page tracking

Hi there, I'm installing some tracking code into the checkout_success.php page. I need to be able to grab the coupon code/discount code name from the order, if one was used so that I can echo it out in my tracking script. I was wondering if anyone knows how to do this? I'm using this contribution of discount coupons; ot_discount_coupo...

Problem with files consists of spaces and single quotes?

I'using the following code to create thumbnails using ffmpeg but it was working fine for the files which have no spaces or any quotes.. But when the file has a space (like 'sachin knock.flv') or files which have quotes (like sachin's_double_cent.mp4) it doesn't work.. What can i do to get those files work accurately? One restriction is...

Tell me some Http-streaming tutorial or example.

Could you tell me some http-streaming tutorial or example ( used also by Gmail ) ? I want to create a simple chat for college project. Attention: I am talking about Http-streaming and NOT long-polling. Thanks ;) ...

variable inside a variable in a php class

is it possible to copy a variable like this this? class Colours { var $var = "one"; var $var2 = array('something', $var); } ...

preg_replace Pattern

Hey Guys, i'm not very firm with preg_replace - in other Words i do not really understand - so i hope you can help me. I have a string in a Text like this one: [demo category=1] and want to replace with the Content of Category (id=1) e.g. "This is the Content of my first Category" This is my startpoint Pattern - that's all i have: '/...

CRON jobs in php deployed in windows platform

How to run a scheduled job scripted in php using windows? I'm using Windows XP sp3. ...

How do I post long strings that contain special characters (like '&' specifically) via an AJAX request?

I'm looking to make a Contact/Query form, wherein the end user can send an email to the webmaster. The form has a 'textarea' field, which captures long strings from the user, if I use AJAX to submit the form using GET method, my params tend to break if their is a special character, specifically '&' in the textarea's string.. I'm stuck p...

php mailer char-coding problem

Hello! I try to use Phpmailer to send registration, activation..etc mail to users... require("class.phpmailer.php"); $mail -> charSet = "UTF-8"; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "smtp.mydomain.org"; $mail->From = "[email protected]"; $mail->SMTPAuth = true; $mail->Username ="username"; $mail->P...

Open source eCommerce solution for multiple vendors (a la Amazon Marketplace)

I'm looking for an open source ecommerce solution that supports multiple vendor selling, in a similar fashion to Amazon Marketplace. I'm not sure this solution exists, but I'd be interested in some feedback. I've looked at Open Cart, Magento and Prestashop, but none of these appear to offer these features. ...