This is a rather obscure question so please bare with me. It's more about approach than syntax.
I have a MySQL table filled with 'notifications' (id,user_id,date,etc). I have to send an alert (via email, facebook, twitter, whatever... not the issue) when each of those entries pings as 'true'. Here's the thing, how should I go about ping...
I have a Php script I want to use for creating a new blog in WPMU. I am having trouble calling wordpress functions like "wpmu_create_user" and "wpmu_create_blog".
My hope is to get this script running as a cron job from command line and pick up new blog creation requests from an external db, create a new blog using the wordpress functi...
$index = Zend_Search_Lucene::open("/data/my_index1");
$doc = new Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::Text('type','auto'));
$index->addDocument($doc);
$term = new Zend_Search_Lucene_Index_Term('auto*');
$query = new Zend_Search_Lucene_Search_Query_Wildcard($term);
$hits = $index->find($query);
f...
I have a php-script that uploads files to an ftp server from a location with a very low bandwith, low reliability connection. I am currently using the ftp functions of php.
Sometimes the connection drops in the middle of a transfer. Is there a way to later resume the upload? How can this be done?
Edit:
People misunderstood that this is...
I want to know why the following query have . and "" in ".$_POST['date']." etc.
$query = "INSERT INTO eventcal ('eventDate','eventTitle','eventContent','user',
'user_id') VALUES('".$_POST['date']."','".addslashes($_POST['eventTitle'])."',
'".addslashes($_POST['eventContent'])."')";
If I change to the following, will it make any d...
Consider the following table structure:
id name rank position
-------------------------------
1 Steve 5 0
2 David 3 0
3 Helen 9 0
4 Mark 15 0
I need a fast algorithm to rate these rows by rank column and store the "position" of each row in position field in realtime.
...
Given 2 dates, how can i calculate the number of hours/minutes between them, excluding weekend time (since Friday 17:30 till Monday 09:00)
The script queries a MySql database but i assume this sort of calculations would be easier in php.
I'm thinking of a iterative function to determine the weekday and keep looping until last date would...
I have a form with a textarea and a JS character counter. Yet the backend script claims that the strlen of the message is longer than the JS character counter claimed. The reason for this, I have discovered, is that the backend sees every newline character as \r\n which is two characters.
Can I simply have it do a str_replace("\r\n","\n...
Lets say I have a class like:
class SomeClass{
function someAction($param1,$param2){}
}
Is there any way to get analyzing data like array('param1','param2') without actual execution of method? Preferably without php extensions or prior code analysis (fopen...)
...
I'm creating a bot in PHP that continuously updates an RSS-feed and gathers information.
Every loop takes around 0.1 sec but sometimes it takes up to 9 sec to finish the cycle.
Why does this happen and is there a way around the problem? I need the bot to be as fast as possible as I'm trying to beat another bot that has the same purpose ...
When I call
addChild('actor', 'John Doe');
this child is added in the last. Is there a way to make this new child a first child?
...
Hi,
I've got a problem with a form in the administration area of my website. I use it for changing the displayed HTML text, it is written in PHP and connects to a MySQL database.
echo "<form action=\"index.php?kat=infos&aktion=upd&kategorie=$kategorie\" method=\"POST\" enctype=\"application/x-www-form-urlencoded\">\n";
echo "<table bor...
Hi,
I have a little problem with a pagebreak. The Multicell is displayed over the footer of the first page and then it breaks: How can I set the bottom margin of the page so that the break happened earlier above? Here is the example PDF: Example and here the sourcecode:
<?php require_once('../tcpdf/config/lang/eng.php');
require_on...
Hi ,
How can I edit the value's in a xml file using simpleXML ?
I know how to create just not how to edit the value in a exciting file ?
...
i have a overflow memory usage problem and i need badly to scan all my scripts . so my question is how to show a list of running mysql queries in php
...
Hi ,
I have an exctiing xml file which has id's 1 - 20 when I create a new xml file I need it to add the ID to the file how can I do this ?
I know how you would do it with SQL but not with xml
please help
...
Hi all
I've created a client with login acces in Flex. After the succesful login i have to show a table based on a mySQL server. The database is composed by some tables, and I have created 6 flex mxml components with each own scripts for each of those tables. How can i load sub-applications, for example with a PopUpButton or a TabBar in ...
Hi,
I have written a simple paypal subscription system, where a user can enter their information, click the button, and start a subscription. Im wondering how I can find out when the user cancels the subscription though? I have seen $txn_type subscr_cancel but I have no idea how to use that, since paypal doesn't call my handler again.
...
Hi,
How can I place the cursor automaticly to certain input box. This would help to not use the mouse all the time when open the page. (php and html)
Thank you!
...
I want to develop a website that contains a forum and live chat and some chatrooms. Now,
should I develop it using Java or Python? I have experience in Java and PHP, but are JSP webpages slower compared to others? My web application will also contain some live chat and chat rooms. Now, there will be a load on the server, and I don't wan...