I'm looking to put together a php script that allows me to enter a custom message that would be sent to all registered user of my iPhone app.
My SQL database contains all of the pushID (aka Tokens) and I would call them by this code:
mysql_query("SELECT cPushID FROM tblUsers WHERE Length(cPushID) > 70 AND cAlerts = 'All' AND cPreferenc...
I have a field with type= date in MySQL DB.
It store dates in YY-m-d format.
How can I write a query which will get the rows where day is equal to some value, for example 1?
I need to get only first days of months (2009-11-01, 2009-12-01, 2010-01-01...)
Thanks
...
I do have a domain search function. In search box you have the option to enter any kind of domain names. what I am looking into is how do I filter sub domain from search or else trim sub domain and keep only main.
for example if a user entered mail.yahoo.com then that to be convert to yahoo.com or it can be omitted from search.
How ca...
i am trying out the Doctrine 2 sandbox. downloaded the main Doctrine 2 ORM from http://github.com/doctrine/doctrine2 the dbal from http://github.com/doctrine/dbal and common from http://github.com/doctrine/common. placed the packages in approparate folders ...
D:\ResourceLibrary\Frameworks\Doctrine\lib\Doctrine\ORM
D:\ResourceLibrary\F...
How should I store settings for project?
Which is better - to use a $settings array with all my settings:
$settings['max_photos'] = 30;
//...
or create a singleton Config class with all the settings in it?
Class Config {
private $max_photos = 30;
//...
}
Any good examples?
...
Can any one please let me know is WORLDPAY payment gateway provides API for php stuffs? did any of you integrates this stuff? please advise me....
...
Hi folk!
I am using Doctrine and sometimes I've the feeling that it is doing much more things than what I am expecting, so I would like to have more information (and therefore more control) about what Doctrine is doing.
So, how I could count the total number of queries that Doctrine is doing?. It would be nice if I could also find the ...
i hate situations, when i can't explain the behavior of compiler. So help me please to understand, how it possible...
i have two php files - index.php, and admin.php. in index.php i make registration, and captcha checking, and if they are correct, i set the value of session variable to somevalue,(at first it has anothervalue) and redire...
Comparing 2 images to see if they are both the same files are easy, threw the files MD5, but is it possible or even plausible to determine if 2 images are same by using PHP GD to get the difference of the two images. If we where to get the difference of the two, and it was all white (id assume white or even black), then we would now know...
I am using google map in my application. I have thousands of markers on my map.
I can display them well on map. I am using MySQL as my database in php.
But I have a problem when there are more than one location on the same position. It displays only one marker for all the locations(for same position).
In API, there is no solution for...
Hello folks,
Here I am trying to route a page without showing its action in URL,
Eg: URL is http://localhost/brands/1/xyz
Router::connect(
'/brands/:id/:name',
array(
'controller' => 'brands',
'action' => 'index',
'id' => '[0-9]{1,}',
'name' => '[a-z]{1,}'
)
);
it works fine....
But I nee...
I want to capture addresses given on "contact us" pages. Is there any PHP script to do so?
I am struck because of it. My client wants to store adresses of the web sites given on "contact us" pages. I am able to get content from the page. But I am quite confused how to get only the address from this page.
For example: www.abc.com/contac...
i made this form:
<form id="form" name="msgform" method="" action="">
<input type="text" size="40" id="msg" name="message"/>
<input type="submit" id="button" name="clicker" value="click" />
</form>
and this jquery script:
$(document).ready(function(){
$("#button").click(function(){
$("#form).submit(function(){
var submision= $("#...
how can I generate random numbers and letters mixed together.
Here is my php code.
$i=1;
while($i<=10000){
echo $i++;
}
...
How can I make the following regular expression ignore all whitespaces?
$foo = ereg_replace("[^áéíóúÁÉÍÓÚñÑa-zA-Z]", "", $_REQUEST["bar"]);
Input: Ingeniería Eléctrica'*;<42
Current Output: IngenieríaEléctrica
Desired Output: Ingeniería Eléctrica
I tried adding /s \s\s* \s+ /\s+/ \/s /t /r among others and they all failed.
Objec...
Do you have any idea, will the sagepay payment gateway block the transactions made from india? that is Indian IP address?
...
i use file_get_contents function to grab data from sites and store the data in database. it will be very inconvenient for me, if one day the script will start not working.
I know, that it can start not working, if they change the structure of site, but now i'm afraid, that maybe there are mechanisms to disable the working of this functi...
How can I limit the following code to generate 8 mixed characters and number in the code below.
Here is the PHP code.
md5(uniqid(rand(1,6)));
...
In many PHP-application, when things are badly documented or weird implemented, the function func_get_args() comes to resque. It allows me to inspect (or print) what variables are passed along to a function
function poorly_documented($op, $a2, $a3 = 'default', $rest) {
var_dump(func_get_args());
// ...
}
Allthough in Ruby I hardly...
I have a wordpress site, and in the home page , there is side bar section.In this section i need to display the archives like
February 2010
friday 5th
friday 12th
friday 19th
friday 26th
March 2010
friday 5th
friday 12th
friday 19th
friday 26th
April2010
friday 2th
friday 9th
friday 16th
friday 23th
friday 30th
How can i do ...