php

users see my SMS messages as coming from '1010100001'

In my application, I ask the user to enter their cell and select their provider. I append the provider's email and create the message and fire via php.mail() The problem is that no matter what the header info is, the message comes from '1010100001' on some phones (like AT&T and the iPhone). When testing on my Verizon phone, I get the pr...

Index page in Magento is way too slow, what can I do?

Weirdly, the index page of my magento commerce is very slow, while when you navigate the products, brands, searchs etc is very fast, but everytime you click on the banner to go for home or enter the website, it take ages to load I wonder what can I do about this? I don't know where to start, since I am new at magento. I thought I could ...

Installing OpenCV as php extension under Windows

Could please anyone recommend me a guide/tutorial on how to install OpenCV as php extension under Windows ? ...

PHP Server Side Post to Recreate Replace Secure Single Sign On

I host and intranet and manager several Single Sign Ons for outside websites. We have always done this through some sort of hidden form. Example <form method="post" action="example.php"> <input type="hidden" value="user" name="user" /> <input type="hidden" value="password" name="password" /> </form> We can then have a javascript ...

getting maps to accept a dynamically generated KML file?

Hi. I have a button that launches the google maps app on my device via an intent. I want to be able to pass it a php page that generates a KML file. I have done this on a website before using the googlemaps api in JS - but it doesn't seem to work on Android. My php file is as follows; <?php echo '<kml xmlns="http://www.google.com/ear...

PHP Browser Detection and Redirection

All, My application supports IE7+, MOZILLA and other modern browsers. Anybody know of a very good browser detection and redirection PHP class? I came across this, but I am not sure if anybody used this: http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#typicalusage Thanks ...

Adding an element to a multidimensional array

How can I loop through the array below and an element per array, with key "url_slug" and value "foo"? I tried with array_push but that gets rid of the key names (it seems?) Doing a foreach($array as $k => $v) doesn't do it either, I think. The new array should be exactly the same only having 4 elements per array instead of 3, with the k...

possible to have a 'publish to facebook' button on my site?

I'm building a music events website and want to have a 'share this event' button which publishes the event details on facebook. this tool looks like exactly what i want: http://developers.facebook.com/tools.php?connect_wizard&amp;wizard=stream_publish however, if i copy the code snippet to new file on my site, it doesn't work. I'm ass...

how to set a status

hello guys..here i've a problem where i want to set the status whether it is approved or reject.. the condition are if admin select the registration number and driver name, that means the status is approve otherwise, if admin fill up the reason, that means the request is reject.. here is the code to set status if ($reason =='null'){ ...

Internal Server Error

I have a HTML file and a PHP file in the same folder on the remote server. From the URL, I call the HTML file and the HTML file calls the PHP file when form is submitted. But it is not going correctly. When I submit the Form, it dislays error: 500 - Internal server error. There is a problem with the resource you are looking for, a...

Class Plugins in PHP?

i just got some more questions while learning PHP, does php implement any built in plugin system? so the plugin would be able to change the behavior of the core component. for example something like this works: include 'core.class.php'; include 'plugin1.class.php'; include 'plugin2.class.php'; new plugin2; where core.class.php conta...

php function array_key_exists and regular expressions

Is it possible to use a regular expression with the php function array_key_exists()? For example: $exp = "my regex"; array_key_exists($exp, $array); Thank you! ...

Remove a child from an array in PHP?

Lets say I have this array: $queue = array("orange", "banana", 'apple', 'watermelon'); If I want to remove any of them,for example I want to remove banana, how to do it? ...

Function within echo problem

Hi, I have a slight problem with the echo statement outputting wrongly. Forexample when i do echo "<div id=\"twitarea\">" . fetchtwitter($rss) . "</div>"; it displays function output but OUTSIDE of twitarea div. What is the cause of this behavior perhaps syntax? thanks in advance Here is the actual function require_once('includes...

Replacing div html() by echoing PHP - how to?

Hello, I have a multiple product elements that get their class and ID from PHP: $product1["codename"] = "product-1"; $product1["short"] = "Great Product 1"; $product2["codename"] = "product-2"; $product2["short"] = "Great Product 2"; <div class="leftMenuProductButton" id="'. $product1["codename"].'" >'. $product1["short"].'</div> ...

Symfony routing with an API Web Service

Hi, I'm finishing the API of our web service. Now I'm thinking on how to make the route changes, so if we decide to make a new version we don't break the first API. right now: url: /api/:action param: { module: api, action: :action } requirements: sf_format: (?:xml|json) what i've thought: url: /api/v1/:module/:action param: { mo...

Drupal: Sorting a view programmatically

Hey there. I'm trying to take the results of a view - using the function views_get_view_result() - and sort the array in a way I couldn't do from within the Views interface. So far so good. I've got a $rows variable with all of the stuff I need. Now... How do I put it back? :) Before I needed this sort, I used views_embed_view(), but I ...

PHP arrays & keys - fetching particular ones

Hi Lets say I have an array with a structure like this: $arr= Array( array( "id"=>"a" "type">"apple"), array( "id"=>"b"), array( "id"=>"c"), array( "id"=>"c" "type"=>"banana") ); now I want to have a foreach loop which fetches all the array elements which have a key in them named "type". So...

Is it possible for PHP to generate a fresh page on every Javascript history.go(-1) ?

Hello, I have a PHP page (a.php) which is already sending these headers: <?php header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Pragma: no-cache'); ?> And on the PHP page (a.php) , it has a link to another page (b.html) on b.html, it has a javascript...

How to hide an error message

I want to hide all mysql error messages without using mysql_error(). Are there any solutions? ...