php

how to avoid some pages from being indexed by search engines?

There is rel="nofollow" but I am not sure about this if it prevents indexing. What do you say? Any ideas Respect UPDATE Sorry I wasn't very clear. There a page a.php, and it has links b.php, c.php, d.php and some other text content. The link to b.php is only relevant if the users are on a.php, and doesn't really returns any output. It...

How to pass immutable data through two webpages that can't be user-generated

I have a flash application (a game) and it needs to pass data to a php page to save the user, and the user's score. However I don't want the user to be able to alter the score him/herself or to initial a scoring without using the application. What is the best way to do this? ...

Identify the checkbox that is checked, in a group of checkboxes

Hello Everyone, I have 2 checkboxes in a form and onclick of these, some php code needs to be executed and based on the result of the code, the checkbox is checked or unchecked. So i have written onclick = document.formName.submit(); Now it is triggering the same page and i am able to write the code. I am not able to differentiate whi...

How to prevent negative number in Mysql

Hello guys.. I have data which is starting from 0 in my database. My php will add 1 or -1 to the data depending on the user's input. My problem is that if data is 0 and a user try to subtract 1. The data become 4294967295 which is the maximum value of INT data type. Are there anyways to make the data stays in 0 even when the user...

Wordpress Hooks vs. includes?

This is somewhat a subjective question. Noticed themes like thematic and carrington use hooks to display their themes. Trying to figure out which works best for a more efficient workflow. Which seems more efficient at theming? Trying to weigh in the cons and pros of hooks vs. just including static files. ...

PHP Apostrophe and query string.

I want to supply a SQL statement from the query string, but all my efforts result in escaped single quotes and slashes. ...

PHP: How do I rename a directory where the parent directory is variable?

i would like to move the files inside uploads/pension/#SOME_VARIABLE_NUMBER#/#SOME_CONSTANT_NUMBER#/ here is my code: // move pension statements // located at uploads/pension/%COMPANY_ID%/%USER_ID%/%HASH% // so just move the %USER_ID% folder to the new company $oldPensionDir = "uploads/pension/" . $demo_user[Users::companyID] . "/" . ...

One code on dev server, and production server - how to deal with links?

I have a copy of a code running on the production server, and I use my local machine(s) running xampp as a dev server. I have several websites that I actively develop, so I'm forced to use http://localhost/sitename All my URLs are relative to the domain, (/file.php). They work fine on the prod server, but on a local server, they all poi...

php print integer in words

Possible Duplicate: Converting a number (1, 2, 3) to a string (one, two, three) in PHP I have a form in which products will be listed out when,i clich total chk box it will be calculated but,it will be integera only,i want this to print in words. For eg:217 it should print in words two hundred seven only. Hope,this is clear. ...

can I have multiline text with GD and PHP?

hello! I'm trying to output multiline text with GD+PHP but can't get it working. my php knowledge is really basic. here's the code, any idea on how to output 2 or 3 lines of text? $theText = (isset($_GET['caption']))? stripslashes($_GET['caption']) :''; imagettftext($baseImage, $textSize, $textAngle, $textXposition, $textYposition, $te...

Using Simple HTML Dom to match a string on the page

Hello all, How do I match and get the flash vars on a HTML page? I am using simple HTML dom element and I am able to narrow down to a div containing the text I need. <script type="text/javascript"> var s1 = new SWFObject("jw4.4/player.swf", "player", "400", "50", "9"); s1.addParam("allowfullscreen", "true"); s1.addParam('allowscriptac...

PSpell in Quercus ?

Hey, We're running Quercus on Glassfish to serve the odd PHP file. I'm wondering if its possible to get PSpell/ASpell(?) spellchecker(s) working in Quercus? It seems for normal PHP you need to compile it w/ PSpell so I'm not too sure how to go about this in Quercus ... Any pointers greatly appreciated :P ...

Force a page cache of Ajax content

I have a page that is an search where the results are loaded via ajax. It then lists products on a page and you can click to view each product. I'd like to change this page where after you view a product if you click "back" on your browser it'll load the cache instead of forcing the user to search again. Note: I'm not looking for an a...

php associative array name?

hello! Just trying to get the name of an assoc array; $test = array('selected' =>$selected, 'sectionList'=>$sectionList, 'categoryList'=>$categoryList); <? foreach($test as $list) { ?> <h3><?=$list?>, <?=$list[id]?>, <?=$list['name']?>, <?=$list['value']?></h3> <? } ?> but either get 'Array' or nothing?! I can see the name when i prin...

Bit conversion operations in PHP

Hello, I find myself in need of performing bit-level conversion on variables in PHP. In more detail, I have a bit stream that is read as an integer by hardware, and I need to do some operations on the bits to make it into what its actually supposed to be (a float). I have to do this a few times for different formats, and the functionali...

Unserializing an API return object (PHP/Ebay API)

I have been working with the Ebay api for a project and have found it great. I have however found a problem now, more PHP related. When I read my items from Ebay, I store a bunch of details in the database. Currently, just for the sake of it really, I serialize the whole return object and store it in the database in a related table. Th...

PHP open source script for a specific website

Hi, Does anyone of you ever heard about a PHP open source solution that would have these features: Users login/registration (ideally connect via Facebook) Upload photos: users can upload photos and exchange them with administrators. No photo will be shown publicly (only to users and admin) Rich backend administration with different rol...

How to connect to a secure FtP from my website/web application?

Hi, I'm working on making a website/web application that displays images every 5 or so minutes, kinda like a webcam. The images are uploaded to an SFTP server. How can I access those from the web? Does anyone have any recommendations for what to use as well? Right now I'm looking at PHP but have checked out javascript and ruby as wel...

cache problem uinsg php and jquery

hi , i am using jquery stars plugin and asking users to rate . the form works well,but caching has become a big problem. even after refresh of the page .it does not show the latest ratings . only after i clear the cache new ratings gets showed. ...

How good is ApnsPHP?

Hi guys, I want to build a push server that can handle a heavy load of push notifications that it needs to send. I was wondering if ApnsPHP (http://code.google.com/p/apns-php/) is the right chice for me, or if I should build it using some other language. Any help or pointers would be highly appreciated! ...