Hello,
I have any array
$num_list = array(42=>'0',44=>'0',46=>'0',48=>'0',50=>'0',52=>'0',54=>'0',56=>'0',58=>'0',60=>'0');
and I want to change specific values as I go through a loop
while(list($pq, $oin) = mysql_fetch_row($result2)) {
$num_list[$oin] = $pq;
}
So I want to change like 58 to 403 rather then 0.
How...
Hello, I have set up an array of censored words and I want to check that a user submitted comment doesn't contain any of these words. What is the most efficient way of doing this? All I've come up with so far is splitting the string into an array of words and checking it against the array of censored words, but I've a feeling there's a n...
I'm trying to use regex to add a span to the first word of content for a page, however the content contains HTML so I am trying to ensure just a word gets chosen. The content changes for every page.
Current script is:
preg_match('/(<(.*?)>)*/i',$page_content,$matches);
$stripped = substr($page_content,strlen($matches[0]));
preg_match('...
Hi,
I have seen some captchas being decode using javascript, php, etc. How do they do it?
For example, very popular megaupload site's captcha has also been decoded.
...
Hi,
I got the following error when i get containts from file("http://www.otherdomain.com").
file() [function.file]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
The domain server is linux.
How to resolve this problem. Please help me.
Thanks,
...
What do I need to put in a php code so that the user cannot access it even if he specified the correct url for the page they are trying to access. And redirect it to the logon page. I'm really having difficulty in this matter, everytime I click back button on the browser the user can still access the page
...
I work for a company that makes application's in C#.
recently we got a customer asking us to look in to rebuilding an application written in PHP.
This application receives GPS data from car mounted boxes and processes that into workable information.
The manufacturer for the GPS device has a PHP class that parses the received informatio...
So in the project ive been working on i use the youtube API to add a video to a chromeless player (got custom buttons, everything works no problems).
It loads the youtube id which it gets from the database (Codeigniter, PHP).
But what i would like to see is: instead of loading 1 video, id like to add all the videos i get from the data...
Hi
I have an email form that isn't sending out an email to the recipient or a copy to the client. The form can be found at www.kelcos.co.uk/contact and the files associated with this are:
/index.php
/jquery.js
/sendemail.php
/submitform.php
/thanks.php
/verify.php
I have used this form on other websites http://www.bowlesgreen.co.uk/co...
hello
I'm new to PHP and I recently started learning Zend Framework. What DAL are you using? Do you think that Zend_Db_* can do the magic? I need it mainly for MySql db. Does it have any limitations and can I use it in big project without any problems because I don't want to go the wrong way.
10x
...
I am developing my first large Ubercart site, which needs to have a daily product database update from an existing xBase (DBF format). The conversion from DBF to MySQL/PHP is handled on the same server as the Drupal installation, using some custom scripting I have done, and works well. However, the next step is to get my script to talk t...
Hi,
I'm trying to look through an array of records (staff members), in this loop, I call a function which returns another array of records (appointments for each staff member).
foreach($staffmembers as $staffmember)
{
$staffmember['appointments'] = get_staffmember_appointments_for_day($staffmember);
// print_r($sta...
why i not getting return on file_get_contents($myurl) but i do get output for wget
updated:
i use curl to get the return header and result and discovery that the it is on the header instead in of the body
HTTP/1.1 200 Document follows
Transfer-Encoding: chunked
Content-type: text/plain
Server: XMS (724Solutions HTA XSAM_30_M2_B020 200...
Does it invoke all modulename_filter alike functions?
If that how can we make the filter take affect only on some specific targets?
UPDATE
Seems it's by calling check_markup explicitly?
...
OK, I'm flummoxed.
I'm trying to execute a query on a database (locally) and I keep getting a connection reset error. I've been using the method below in a generic DAO class to build a query string and pass to Zend_Db API.
public function insert($params) {
$loop = false;
$keys = $values = '';
foreach($params as $k => $v){
...
Please recommend Secure, customizeable, open-source chat on PHP/JavaScript for all popular browsers.
...
How to get Locale using Php,I want to get the time zone based on the location,
is there any possibility to get in php.
I need to convert it to GMT and save Database.Again i need to Pull it back to UI with same time same time zone.
...
Hi everybody!I have downloaded a script Reece Calendar from internet,I finally connected it with database but I have some errors in it!
Can you please help me?
The first errore is:
Undefined index: timeout in C:\wamp\www\ReeceCalendar_0.9\cal\gatekeeper.php on line 180
and the code in this line is:
if($d['timeout']!="") $cal_opti...
I would like to detect encoding of some text (using PHP).
For that purpose i use mb_detect_encoding() function.
The problem is that the function returns different results if i change the order of possible encodings with mb_detect_order() function.
Consider the following example
$html = <<< STR
ちょっとのアクセスで落ちてしまったり、サーバー障害が多いレンタルサーバーを選ぶとあ...
I have a requirement in which, i need to upload an excel file into SQL Server database. It is working well till this point.
But sometimes i am getting excel file in such a way, that the first 2 rows and columns are empty rows. That is not even fixed every time. so the format of the table after upload is not as expected. It is assigning...