Example of a string:
"Some text.....!!!!!!!!?????"
Using PHP how would I get the position of the last letter (or even alphanum character) which in this example is the letter t?
I have a PHP script that checks the HTTP Referer.
if ($_SERVER['HTTP_REFERER'] == 'http://www.example.com/') {...}
However, this seems inherintly unsafe ... because what happens if the user goes to 'http://example.com/' or 'http://www.ExaMple.com' (both of which don't match the equality test).
Question: what's a better equality test to ensure that the HTTP Referer is coming from 'example.com' ?
For each ad on my site, I would like a box that shows the number of views it has (similar to this site).
How would I capture the number of page views an ad has? Is there a function that does this in PHP?
I am saving personal information in PHP page.when user click submit it saves but user can go back in submit information page through browser back button.Hoe can I expire my previous page??
I have a secret word (example. dirtydawg)
And using PHP I want to create the uppercase MD5 value of the ASCII equivalent of the secret word.
How do I do this????
Can PHP array passed POST method to catch in ASP.NET MVC?
Query string: WebAccess/ArrayTest?val[]=1&val[]=2&val[]=3
I write: ActionResult ArrayTest (String[] val)
But this only works if the query string to remove the "[]"
HI I do have image files in directory which is downloaded from several resources..
if I do have name of that image then how can I check existence of the same with PHP
hi,
I need to incrase the php file upload limit of 8MB on an IIS server.
I don't have access to configuration files, so I was wondering how to increase it (I need something similar to .htaccess for apache..
thanks
How do I count the minutes and hours since a member registered from there registration date that is stored in my MySQL database as datetime using PHP & MySQL.
Here is what I have so far.
date('F j, Y g:i:s A', strtotime($row['rdate']))
I would like to do something like this:
abstract class Foo
{
public function __construct()
{
echo 'This is the parent constructor';
}
abstract function __construct();
}
class Bar extends Foo
{
// constructor is required as this class extends Foo
public function __construct()
{
//call parent::__construct() if necessary
echo 'This is the child constructor';
}
}
But I get a fatal error when doing this:
Fatal error: Cannot redeclare Foo::__construct() in Foo.php on line 8
Is there another way to ensure child classes have a constructor?
I am starting my first "programming" project in PHP making some sort of web application that give the linux program, Motion, a decent web interface.
Anyways, I was curious as to how when real applications are programmed, do y'all go for a class for each view or one single class for the application altogether? I know this is more of a preference thing, I was just curious as to how it happens in real software.
How can I go about adding users/number, changing things from PHP(or python) on an asterisk server?
ps. also are there any better ways to get the current asterisk settings, users, numbers other than scraping the config files?
I have an XML ISO-8859-1 page, in which I have to output symbols like é.
If I output é it errors out. é works just fine.
So, what PHP function should I use to transform é to é
I can't move to utf-8 (as I assume some will suggest and rightfully so) This is a huge, legacy code.
I'm having a hard time installing zend_debugger, somehow the installed version doesn't match with my php.
Is there a repository for all versions of zend_debugger?
I have an XML ISO-8859-1 page, in which I have to output symbols like é.
If I output é it errors out. é works just fine.
So, what PHP function should I use to transform é to é
I can't move to utf-8 (as I assume some will suggest and rightfully so) This is a huge, legacy code.
Hi,
I have a simple question. Is it okay to use array without single or double quotion like $array[key]? I thought it is bad because PHP look for constant first if I don't use single or doulbe quotion. One of my colleagues told me that it does not matter.
WHat do you guys think?
I am trying to create a blog using blogspot. It seems it is not possible to upload anything other than image files to blogspot. I want to upload a PHP file. I managed to upload the file to google sites, but it is coming as downloadable there instead of executing.
Is there a work-around here other than buying my own server space?