i have the sentence
something about something WORD still something...
what is the most efficient metod to delete the word "WORD" from sentence in php?
thanks
We have an application that takes snapshots of certain web pages. It's quite tightly integrated into the code, so we're not ready to incorporate another library.
But we don't have a way of being able to calculate the web page height, so we end up taking snaps of 8000px height. Which is now proving troublesome when inserted into PDFs.
Is there a way to find the height of the webpage in PHP?
I need to round times down to the nearest quarter hour in PHP. The times are being pulled from a MySQL database from a datetime column and formatted like 2010-03-18 10:50:00.
Example:
10:50 needs to be 10:45
1:12 needs to be 1:00
3:28 needs to be 3:15
etc.
I'm assuming floor() is involved but not sure how to go about it.
Thanks
I'd like for my app to be able to tell if an image hasn't been viewed in the last 30 days and remove it (along with data in the DB associated with it). I know you can have PHP read and output the image dynamically but I've heard its quite taxing on the system. Is there a way to for me to track these hits even when the image is viewed directly? (would htaccess be able to do this?) Thanks in advance.
I've bounced around between different wrappers, my own, and using straight php mysql functions over the years but I'm sure there's a really good solution out there. What is it? :)
EDIT: Only needs to connect to MYSQL and it would be nice if it was lightweight.
Hello, how made in PHP from format 52.593800, 21.448850 format +52° 35' 37.68", +21° 26' 55.86" like do it google http://maps.google.pl/maps?hl=pl&t=m&q=52.593800,21.448850 ?
I need to validate phone number in PHP. I have made following regex, but I also need to it to accept numbers starting with plus char, how can I do that?
^[0-9]$
I am using php conditions and want to know if I can run a JavaScript funtion without some one have to click on it using JavaScript:
if($value == 1)
{
javascript to run the function
}
How would I do that?
Hello,
I have a PHP variable that holds some HTML I wanting to be able to split the variable into two pieces, and I want the spilt to take place when a second bold <strong> or <b> is found, essentially if I have content that looks like this,
My content
This is my content. Some more bold content, that would spilt into another variable.
is this at all possible?
i have studied design patterns and want to use them to code an open source library (not an application).
but i have never coded a library before and don't know where should i include files, should i have a bootstrap file that loads everything or should every class load their own classes they are dependent on etc.
are there any tutorials for writing libraries in php from start to finnish?
thanks
For hadoop application development, are PHP frameworks less popular ?If so, why? Else,please do point literature/documentation/tutorials for a specific framework? (stuff for Symfony would be awesome!)
Hi,
I need some advice from experts :)
I will develop a website using PHP and I will use also MySQL. I bought some server space from a Virtual private server including all the service needed.
How should I develop the site? Shall I develop it on my machine at home (using for example Wamp), and when ready transfer all the files to the server? If so what is the best method to transfer also the database?
Thanks in advance!!
Hello, im developing a program who change his background image in function of the trending topics of twitter. So i have a function who return me a word (first TT on twitter), then i need another function that give me a url of an image relative to that word, like google images when you search or flickr. Do you know how to do this? or even better, do you have a php script made?
From what I know about PHP, the following syntax is not legal:
if ($s == Yes)
It should instead be written as:
if ($s == 'Yes')
However, the first example is working just fine. Anyone know why?
Trying to parse a YouTube feed using PHP
simplexml_load_file();
I am able to access other tags pretty simply using
$xml->id;
When I try to access
<openSearch:totalResults>
with
$xml->openSearch->totalResults;
I don't get any results
I mean an interface definition without defining the return type makes it unusable?
This makes more Clear
Interface run
{
public function getInteger();
}
class MyString implements run
{
public function myNumber()
{
}
public function getInteger()
{
return "Not a number";
}
}
In Java every Interface has a return type like Integer,String,Void
I know that PHP is unfortunately a loosly typed Language but isnt there a Solution for that Problem?
Is it Possible to defining a Interface with a Return type like Integer?
Hi,
I am storing images in mysql Db directly. what is the best way to display the image in good quality (thumbnail and original size images) using php.
After I select the checkbox and press the button, the result data should display in the other page.I need to know the way I do this in php. My querry is working fine in the database and It shows the results.Now I need to display those results in the other page after selecting the first page checkbox and button(relevent to that checkbox).
What is the best way to store users passwords in a MySQL database using PHP. For example, md5 or is there something better? examples would be much appreciated.
Hello people!
I'm a bit confused here.
I have a php array like this Array(2010,2009,2008 ...1992) and i want to create a loop to print a menu with a four year range counting down like this
2010-2006
2005-2001
2000-1996 etc..
How can i do this Everything i tried end up in an endless loop.
THnx in advance.
J.
In mod_perl i can do something like:
$ENV{REMOTE_USER} = "username";
$r->user("username");
And then the username will show up in the username section in the logs.
Is there a way to do this in php? without having to modify apache?