php

Send a xml file with POST and receive in php

hi guys, I'm working on an application using Android SO and Java. I would like to send an xml file as POST to a php server, that inserts the information from the xml into a database. how can i do that? regards :D ...

how to exclude a .js file for a particular page

my js files are included through header. i dont want to have some .js files included in certain pages, while that particular page is loading. is it is possible.??? help me please..... ...

Apple Push Notification: Sending high volumes of messages

Hi I am using PHP to connect to apns to send some notifications to multiple devices, although the question is more conceptual so it doesn't have to be specific to PHP. I will be sending to about 7000 devices (and growing) all at the same time. My process runs ONCE per day and broadcasts to all devices, so I am not constantly re-opening ...

Access Denied in JQuery.1.4 hosted by Google or my own domain!?

Hi, I'm currently working on a website for a client and I'm getting a strange error in Internet Explorers of all ages. The site loads with no problems except for a permission denied error inside my JQuery. Stranger still, the error occurs even hosted on my own domain OR if its hosted by Google. At the moment its hosted by me. The dev ...

How to retrieve an url parameter in the Zend Framework ?

Hello guys ! I'am trying to retrieve an parameter passed in a url using the zend framework. But of course, it is not working ! My code looks like this : Generating the url : <?php echo $this->url(array('controller' => 'poll', 'action' => 'showresults', 'poll_id' => $poll['_id']), null, true) ?> Retrieving the "poll_id" parameter in ...

PHP - How to insert special characters into a database?

Hello. Can anyone tell me how to insert special characters into a MySQL database? I've made a PHP script which is meant to insert some words into a database, although if the word contains a ' then it wont be inserted. I can insert the special characters fine when using PHPmyAdmin, but it just doesn't work when inserting them via PHP. Cou...

PHPMailer - How to add more then one EmbeddedImage.

Hi! I have problem with PHP mailer. I try to send email with Embedded Image. The php mailer send only the first image from attachment. My Code: Get path to all image in html using simple_html_dom.php foreach($ht->find('img') as $img) { $val=$img->src; $val=explode('/',$val);// $c...

Split PDF documents into separate pages using PHP (or possibly perl)

Can anybody point me towards a PHP library or script that would allow me to split a pdf consisting of multiple pages into separate files, each containing 1 page. The PDFLib documentation doesn't appear to allow this and Google hasn't been particularly helpful. I could possibly also use Perl, but it would be very inconvenient to do so. ...

Jquery and PHP function

How can I this PHP function include in jquery .html? PHP function: function trim_text($string, $limit, $break="<", $pad=" ...") { $words = explode(' ', htmlentities(strip_tags($string))); $countr = count($words); if ($countr <= 8) { return $string; }else{ // return with no change if string is shorter than $limit if(strlen($string) <=...

mobile browsers' can't login to my site

i've tested my site on 2 phone models using the 'generic' browser that came with the phone, but sadly, everytime I tried to login, it will return me back to my index page. here's my login code <form name='login' method='POST' action='authentication.php'> <table border=0 cellpadding=2> <tr><td>Login:</td><td></td></tr> <tr><td>E-ma...

different ways of getting the IP Address

I was actually going through the question 1636644 .. and got confused with this " The getenv() function access to any environment variable to get the related value! " Also .. " It would probably be better to use $_SERVER['REMOTE_ADDR']; to prevent incompatibilities between servers. " what kind of compatibility issue can this be ??...

How to implement callback methods inside classes (PHP)

I need to use a class callback method on an array inside another method (the callback function belongs to the class). class Database { public function escape_string_for_db($string){ return mysql_real_escape_string($string); } public function escape_all_array($array){ return array_map($array,...

Redirection of xml file for iphone app

Hey guys, I have a xml file on my server like the one below : www.myWebSite.com/myXmlFile.xml which is used by my iphone application. In case the address of my xml file changes to www.myOtherWebsite.com/myXmlFile.xml How can I make my app to work anyway ? What kind of PHP server-side code do I need to write ? Is NSURLConnection...

Not saving all data in cakephp

Hi, Im doing a simple save, and its not entering all the data. I have two models, message and emailmessage. The message table is getting populated ok, but the emailmessage table, is only getting the foreign key message_id. Below is the code. Anyone notice anything unsual? EmailMessageModel class EmailMessage extends AppModel { var $n...

Getting started with URL routing with PHP CodeIgniter

I just thought of routing my URLs which is like http://localhost/codeigniter_cup_myth/index.php/adminController/mainAccount and it would be pretty nice if it was http://localhost/codeigniter_cup_myth/Accounts/mainAccount Where should I start when routing URLs in my web application? ...

How to let Zend render a dynamic footer on every page?

In the app I'm building, I'd like to have a nice footer with data from the database (tags) and a contact-form. All the parts are scripted, but now I'd like to put them all together. The elements of the footer are the same for every page loaded, only the content is different. How can I do this, without having to put too much code on ever...

How is the PHPSESSID generated?

Psudeocode or PHP code desirable. References even better on the components and procedures to generate the PHPSESSID manually. ...

curl redirect to wrong page?

i am using curl and i am passing url, with page no=2 but it redirect to first page.i need your help please help me example if i passed= http://itunes.apple.com/us/genre/mobile-software- applications/id6018?mt=8&letter=A&page=2#page it redirect to= http://itunes.apple.com/us/genre/mobile-software- applications/id6018?mt=8&letter=A&pa...

Regex for multi-line HTML comments (preg_match_all)

I have an html document with multiple commented-out PHP arrays, e.g.: <!-- Array ( [key] => 0 ) --> Using PHP, I need to somehow parse the HTML for only these comments (there are other comments that will need to be ignored) and extract the contents. I've been trying to use preg_match_all but my regex skills aren't up to much. Could an...

Wordpress where the "admin_url" is set ?

basically need to change the value that - admin_url() returns any idea? ...