php

are out there token_get_all variations?

Hello, I am wondering if there exists a token_get_all() method in Actionscript like PHP does have? Further thinking, I am wondering if there are different versions of such function in any languages used for web developing. Such as token_get_all_html(), token_get_all_cpp(), that will split the input of HTML/C++/Java/PHP into tokens. Th...

how to call php functions from .NET WPF application?

So I'm going to bild a simple PHP CMS. I need to know how should I bild it to be able to call its functions from .NET WPF application. And how to call PHP functions and send forms from WPF .NET application... BTW: I'm going to have users with passwords that would need some form of autentication. after which they'll need to call that fu...

Kohana auto_login not working

I noticed today that the auto login for the Auth module in Kohana does not work. I snooped around a little and I think I found the problem. The authautologin token is saved in a cookie and the database just fine whenever I login with "remember me" enabled. However, everytime I logout, the cooie gets destroyed. Looking in the Auth libr...

How do you display your php source code with highlight or view source?

How do you display your php source code with highlight or view source or is there more alternatives to this? ...

How to create a Global Timeout Background Worker in PHP, Flash, or ASP.NET

Background: I have an inherited web application that uses Flash AS2 and PHP 5.x on IIS (Windows 2008 R2) with MySQL. There is a setting for a timeout that does not work - no code was ever written but the client has the radio button to turn it on and off. The setting is saved in the MySQL database. Requirement: The timeout should give ...

What do you think about modx to use as CMS?

First of all, hi to everyone! I wan't to ask everypeople if they know modx cms framework, if yes, what do you think about it? If you know it and don't like it, what cms do you advice to use? Thanks in advance, José Moreira ...

Why unneeded xhtml and js, axd comes in Asp.net pages ?

Can anyone explain why it comes? it makes source code lengthy and it will affect to site SEo also. Site is using Sitecore CMS Is this fault of .net framework? or Sitecore CMS? is PHP and other technology better to produce clean, semantic and W3C valid code? these extra info in header (what is the use of these) <head> <meta name=...

Validate if an application is at the server

Hi all, I have an own webserver and for one of my clients I need to be able to search through PDF's. I've asked my hostingprovider to install the xPDF package. Now I've come to testing and I'm calling this line of code in a PHP script: $content = shell_exec('/usr/local/bin/pdftotext test.pdf -'); The only thing is, I'm getting a NULL ...

how to get value in array from individual query

i have a Book ID Array Array ( [0] => 61 [1] => 72 [2] => 78 [3] => 100 [4] => 102 ) *now from another table table_bookPrice where price filed is given i want that select all price from table_bookPrice where book id is in given array (book ID Array) and if price is not mentioned in ...

What would be the best way to add two associative arrays such that duplicate values are not over written : `+` or `array_merge` ?

What is the best way to add two associative arrays such that duplicate values are not over written : + or array_ merge ? I was pretty sure that using + operator I can add two associative arrays such that duplicate values are not over written but this Answer is saying something different and so am not sure if it is really true. I would ...

How do you detect a website visitor's country (Specifically, US or not)?

I need to show different links for US and non-US visitors to my site. This is for convenience only, so I am not looking for a super-high degree of accuracy, and security or spoofing are not a concern. I know there are geotargeting services and lists, but this seems like overkill since I only need to determine (roughly) if the person is...

Creating a Mailing List (PHP)

I have a website where I have two text boxes for information entry. My "Submit" Button orders a PHP file to take the information in the two text boxes and copy/paste it into a text file named "Members.txt" The purpose is to take the information from the text boxes and create a mailing list. Now my problem is that I know the PHP file is c...

array key initial value

i want to set my array key initial value to a certain number. here is what i have: $tickets=array(); array_push($tickets,"10","20","TBD") for($i=3; $i<20; $i++) i want my array initial value to start at 3 not 0. any ideas ...

Add and remove form fields in Cakephp

Hi Guys, Im looking for a way to have a form in cakephp that the user can add and remove form fields before submitting, After having a look around and asking on the cake IRC the answer seems to be to use Jquery but after hours of looking around i cannot work out how to do it. The one example i have of this in cake i found at - http://...

how to set multi hasMany connection between model ?

im using doctrine-project and i have 3 tables table 1: post -------------- postid , title , date , some more fields.... table 2: tags --------------- tagid , title table3: post_tags -------------------- post_tags_id , tagid , postid table 3 is link between tags and posts which mean each post get tags through post_tags now in ba...

How to use AMFPHP functions from .NET WPF application?

How to use AMFPHP functions from .NET WPF application? ...

mysql - search between dates where all dates appear

I'm working with some imported data that stores details about whether a "room" is available on a specific day or not. Each room has an individual entry for the date that it is available. | id | date | price | -------------------------------- | 1 | 2010-08-04 | 45.00 | A user can search across a date range and the sea...

what does "&key" means in php?

I have a very weird problem. I am using php. In my php code, I wrote the email content and generate this link: .... <a href="http://www.domain.com/act.php?id=' . $userid . '&key=' . $actkey . '">http://www.domain.com/act.php?id=' . $userid . '&key=' . $actkey . '</a> .... Most of the times, it works fine. Then, I receive lots of comp...

image resize while keeping ratio

im listing photos using mysql. like <? $a = mysql_query("select * from x"); ?> <? while ($w=mysql_fetch_array($a)) { ?> <img src="<?=$w[url]?>" alt="<?=$w[name]?>" width="150" height="110" /> <? } ?> for this thing, how i can keep picture RATIO? a picture in width 150 and height 500 goes very very BAD quality.. how can i fix this? ...

comparing values of two arrays in php

i have two arrays which keys are book id( 61, 78 ,...etc) (1) book_width ( [61] => 8.3 [72] => 8286.1 [78] => 6.4 [100] => 8407.0 [102] => 0.7 ) (2) book_height ( [61] => 9.00 [72] => 150 [78] => 8.00 [100] => 150 [102] => 3.00 ) now i want an array whic...