php

SOAP request with attribute

hi all, I can not seem to find out how to set an attribute to a SOAP request without using the XSD_ANYXML encoding. The request parameter should look as follows <request xmlns:ns="/some/ns"> ... <ns:parameter attr="some attribute"> value </ns:parameter> ... </request> Of course the following c...

Encoding in UTF-8 from PHP

I am not that good with encoding but I am even falling over with the basics here. I am trying to create a file that is recognised as UTF-8 header("Content-Type: text/plain; charset=utf-8"); header("Content-disposition: attachment; filename=test.txt"); echo "test"; exit(); also tried header("Content-Type: text/plain; charset=utf-8");...

Updating MySQL with textarea content without reloading

Hi, I'm building a page which loads the contents of our MySQL db for editing. Each row of the table is in a seperate, editable textarea on the page. I need the user to be able to update each row (ie send it's contents to the db) without reloading the whole page, with a click of a button that's responsible for that specific textarea. I u...

session should never expire by itself

I m using login function in my site with session. This session of mine gets expired after few minutes irrespective of that user has logged out or not. Now what i want is that the session should only gets expired when a user logs out.If a user doesnt log out his account and then comes back after 2-3 days even then he should appear logged...

php storing tamil in php mysql database

hi everone, **njhw]wf;fpuk Muha]r]rpa[k]/ rpj]j kUj]Jt tuyhWk] 1). "hdpfSf;F ,y]yhjJ vJ> m). r";rpj fd]kk] m{). m{fhkpa fd]kk] ,). gpuhuj]jf] fd]kk] <). ,tw]wpy] vJt[kpy]iy. 2). ‘,iwtdpy] ,Ue]jy]y/ khiaapy] ,Ue]J jhd; cyfk] cw]gj;jpahfpd;wJ’ – ahh] bfhs]if m). irt-rpe]jhe;jpfs; m{). m{rPtfthjpfs; ,). rkzh]fs; <). ntjh...

Custom domain with Joomla

Is there any nice component for Joomla 1.0.x allowing to serve custom domains? What I am trying to archieve is to sell subscription to my service and to offer custom branding including custom urls like yourcompany.myservice.com and even example.myservice.com. Any pointers? I am selling subscriptions themselves already for a long time, so...

How to remove nodes from Views in drupal 6

My view holds a list of nodes ranked by rating (vote-API/Fivestar). I wish user to hide nodes they do not wish to see in this view. Can this be done? ...

Error messages show up in the pop-up window, how to fix?

Hello! I have this signature generator script. And when the images you upload does not meet the requirements the user recieves an error message. The problem here is that the error message shows up in the uploading pop-up, is there any way to show the error messages in the original page instead? Here is my signature generator script. ht...

Simple PHP AJAX File Read Progress Problems!

Okay, im not very good at describing these things, so bear with me.. Im trying to find a way of showing a status/progress bar kind of thing to show the percentage (or whatever) of how much of a text file has been read/parsed by php. I know roughly what I need to do (be it by counting the lines, or filesize and that of the actual text fi...

Clearing Symfony cache for another application

I would like to clear my frontend application's cache from an action in my backend application. How can I achieve this? ...

PHP date() in foreign languages - e.g. Mar 25 Aoû 09

I have a script that needs to display date data to an international audience - e.g. "submitted Tue 25 Aug 09" Is there an easier/cleaner way to get this converted to the French(etc) equivalent "Mar 25 Aoû 09" than: Setting a constant LANG and a $LANGUAGES array of include files & : if(LANG != 'EN') { include $LANGUAGES['LANG']; }...

Passing variable to flash from php

Hello! I have a little problem..but im goin' to crazy... In the html i have this code: <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0" ID=flaMovie WIDTH=554.6 HEIGHT=57.3> <PARAM NAME=movie VALUE="main_menu.swf"> <PARAM NAME=FlashVars VALUE="nye...

PHP StdClass Object accessing a$b

Hello, The below is a dump of variable $x (youtube video). But I want to access media$title, but obviously when I try $x->media$title->$t it does not work. Any suggestions on how to access the title of the youtube video? stdClass Object ( [version] => 1.0 [encoding] => UTF-8 [entry] => stdClass Object ( [xmlns] => http://www.w3...

Does google adsense use PHP?

I found the code below on a website where a google adsense ad usually shows up at, it was in the box the size of a google add, I am curious if this was from google themself or if the site owner used this code? I can't provide a URL as it was a 1 time thing, or randomly happens. <?php if (isset($_GET["client"]) && isset($_GET["slot...

Match whole field in Lucene

I'm currently indexing a database with lucene. I was thinking of storing the table id in the index, but I can't find a way to retrieve the documents by that field. I guess some pseudo-code will further clarify the question: document.add("_id", 7, Field.Index.UN_TOKENIZED, Field.Store.YES); // How can I query the document with _id=7 // w...

Switch case with three parameters?

Is it possible to use three parameters in switch-case, like this: switch($var1, $var2, $var3){ case true, false, false: echo "Hello"; break; } If not, should I just use if-else or is there a better solution? ...

Guitar Tablature and Music sheet oriented plugins for wordpress or Drupal

I'm familiar with wordpress and cakePHP; however, I'm building a small community website (hobby) that allows users to post music sheet (pdf/image) or guitar tabs ( text files). These music sheets should be organized by artists and songs. I've already built my own cms, but I'm not looking forward to maintain it as i'm scared I won't have ...

PHP Regular expression

Hi, I'm trying to match a string like this: {{name|arg1|arg2|...|argX}} with a regular expression I'm using preg_match with /{{(\w+)\|(\w+)(?:\|(.+))*}}/ but I get something like this, whenever I use more than two args Array ( [0] => {{name|arg1|arg2|arg3|arg4}} [1] => name [2] => arg1 [3] => arg2|arg3|arg4 ) The ...

Create a demo of a webapp

I've got a webapp (basically a CMS) running on Apache built with PHP5/MySQL. Which would be the best practice to create a demo version on the web? The only way I can think of is duplicating the entire database for each new user and running a cron job one or twice a day to remove those duplicates. ...

Newbie php class inheritance question

I had a problem recently with a php project that I finally realised was down to the way I had structured my classes. If I tried to include more than one class in a page and both classes shared the same parent class, the script failed. I've now resolved the issue but was wondering if someone could explain to me exactly why what I was doin...