php

Drupal + AMFPHP + Simplenews. Is it possibile?

I'm integrating Drupal with Flash using AMFPHP as a service. Everything works as expected with view.get and node.get The problem is that now I need to integrate the newsletter making flash "talk" with simplenews since simplenews works as a module I can't find a way to let them talk. What I would need is to send an email address and g...

php regular expression help?

how to i replace Apple 123456 to Apple 1|Apple 2|Apple 3|Apple 4|Apple 5|Apple 6 by php pcre? ...

Sagepay 5006 error code fix

Can any one please let me know why the sagepay throws the 5006 (Unable to redirect to Vendor's web site.), i can able to post transaction to sagepay and can able to give credit card information at sagepay's end. But, my problem is once it return back to my notification page it throws error 5006. and i could not reach my success or fail ...

Where to put custom functions in Zend Framework 1.10

Hi, I have to use custom functions / objects in my web application based on Zend Framework 1.10. Where is the best place to put them ? Thanks in advance ...

textbox visibility

I have created one html table,each row has checkbox. i want that when i click on checkbox., all the caption in that rows should be displayed with textbox,so that i can edit that.in short i want multiple row edit functionality. ...

wordpress sidebar with custom 'widget' select

hey there, i thought i was trying to create something pretty common, but i can't figure it out. i want to be able to create / 'prepare' blocks of html, wich you can assign to pages. example: - create a few content blocks (customer list, internal banner, maybe some fancy button) - When editing / creating a new page, just 'check' wich...

How to crop an image while uploading?

Hi I am doing an social networking project ,where i have an option to add/edit photos ,When user clicks the button the image will be uploaded to the database and it will be updated...is it possible to crop the image before it is saved to the database. ...

How do I show progress message while updating in PHP??

What I am looking into is:- I do have a search page say index page. and the action file is search.php. when I fire a query search.php will start processing on what I searched. structure of search.php it uses $_GET function to retrieve query from index page. first it will search in MySQL database. IF yes then display the result from ...

How to encode # character in the url + php + Joomla

I am trying to fetch a variable address from my current URL using JRequest::getVar('address') method. But if the address value has a (#) character, the part after the # character is not retrieved. I understand that URI is a combination of query + fragment and the part after a hash symbol is treated as a fragment. I have tried to use url...

Countdown Time in php

I am trying to make a countdown timer in php i have a start timestamp & end timestamp iam trying to get the output to look like this 00:05:10 can anybody lead me down the right path. Thank you ...

PHP strict code validation

I use PHPClipse for my PHP development. It has some code highlighting and some other validation such as forgetting to put a ';' at the end of a statement or forgetting '}' etc. I find it is easy to make a mistakes, for example class foo { private $test; function __construct() { $test = new stdClass; $test->myV...

Mobile technology products using PHP/Javascript/jquery

Hi All, I wanted to know the mobile technology products which are developed using PHP/Javascript/jquery. Which are latest mobile products are available in market developed using above mentioned langauges. Are iphone,blackberry,nokia and etc uses these above technologies to develop product and which are those products. If anyone has a...

Sending cross platform emails with PHP, how to handle line breaks?

When creating a script to send emails using the PHP mail() function I'm coming across issues with new lines. PHP on Unix systems expect headers to be separated with a LF character, despite what the docs say, sendmail then replaces these with the correct CRLF. However on Windows the message and headers are sent as provided. This was desc...

/etc/hosts doesn't affect PHP

Hi! I'm having problems with the hosts file and PHP. When running the PHP code as root, the entries from /etc/hosts are read. But not when running the code as my user, or from apache. root@server:/# cat /etc/hosts 127.0.0.1 mydomain.com root@server:/# php -r "echo gethostbyname('mydomain.com');" 127.0.0.1 markus@server:/$ php -...

[php] replace \n with actual new line character code

Hi all, I'm pulling content from a DB that has been sanitized using mysql_real_escape_string. Accordingly the new line characters now appear as "\n". The issue is that this content is displayed to users inside a < pre > tag so I cannot replace \n with < br/> for instance. I suppose I could replace \n with the actual utf8 character code...

Sagepay cURL data posting

can any one please let me know where i did the mistake on the below code. I have just post the transaction information to sagepay as the format suggested by sagepay. so i have used cURL to post those information. here my doubt is appears on the line number 10. please advise will i use this statement for fresh connection creation? will ...

rewritebase not working

Hi , I am using the rewrite url , And its working fine , But if do url rewriting then my CSS and JS not working bcoz i am call my script / css somthing like href='css/style.css' , I tried direct url instead of siteurl , Then css working , i finally desired ed to use rewritebase but for me its not working , if put this snippet then t...

Problems with javascript inside echo

I want to echo the following code: <a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;" class="delicious" target="_blank">...

Multi Dimensional arrays in php

Hi, I am new to php (learning since 1 week ). I am learning arrays. while doing it, I found a api which gives out results in the form of a multidimensional array.. and I am unable to echo the values of the array .. Sample response Array ( [query] => Array ( [count] => 1 [created] => 2010-07-16T08:35:38Z...

php include() from server root?

I'm deploying from my WAMP testing environment to an online test... Locally I had my include paths something like this: include('C/wamp/www...') how do i find the equivalent path on my server? i've tried using '/' to get to the root but i get this error: Warning: require_once(/test123/mvc/views/txt/index_nav_txt.php) [functi...