php

how to show store view code in category url in magento

i have installed magento on http://www.example.com the url for it is http://www.example.com/Category/Subcategory but i want it to http://www.example.com/Storename/Category/subcategory. and i have also created a addon domin http://info.example.com/Category/subcatgory i need it as it is.how can i make my http://www.example.com/Storename/ca...

PHP OpenSSO Authentication

We are currently implementing a new OpenSSO Server. The server is on a different server from the web server and I am having trouble getting authentication to occur on our PHP Web server. The cookie set with the openSSO Token is called iPlanetDirectoryPro. This is set from authServer.company.com . I need to read this from webserver.compa...

Exporting a query to CSV

hey i need to export the results of this query into a .csv so i can create a chart i just haven't any idea how to go about it and im still semi new to php thanks for any help. $query="SELECT familyID, Fam_End_Date, Fam_Start_Date, DATEDIFF(date(Fam_End_Date), date(Fam_Start_Date)) AS Days_Between, TIMEDIF...

Upload XML feed to mysql using PHP

Hi I have an XML feed coming in: <?xml version="1.0" encoding="UTF-8"?><product> <name>John</name> <contact_email>[email protected]</contact_email> <contact_telephone>01234 567</contact_telephone> <url>www.johnsone.com.com</url></product> I need to get this loaded to MySQL using php - have seen a few examples but all of them take a f...

Combine php variable and SELECT variables into one SQL Insert query

Hi, I've the following query: INSERT INTO table ( memberid, field1, field2, field3 ) VALUE...

How to stop someone from going back to previous page?

I am working on a my site to allow users to take test so they can see how much they know of a particular subject. I am running into a little problem though. Once a user submits the test for grading, how do I prevent them from going back to the test page? I am on a Mac with Safari running and when I click the back button in my web browser...

Preloading images in a PHP session

Hi, I am using sessions to keep track of user data. I have many pages that access the same set of images. Is there a way to preload the images into a session so that they are loaded for the rest of the session? -Mike ...

iPhone sdk getting data from php

Hello, i have a problem with my iPhone application. I want to read a mysql database, one method is to serve the data over php. My php file looks like this: <?php $db_verbindung = mysql_connect("localhost", "root","") or die ("Keine Verbindung moeglich"); $db = mysql_select_db("testdb") or die ("Die Datenbank existiert nic...

preg_replace a specific pattern

I would like to use preg_replace to replace "* @license until */" with "testing". How can I do it? My text is the one below: /* * @copyright * @license * */ I hope everyone have understand my question correctly. ...

Displaying feed with the correct html character entities

I have feed that's already broken down into the content I need. Part of that content contains things such as &\; and "\;. I'm using PHP's str_replace() to find and replace them to be their correct html character entities (ex. &amp;). However, it won't find this: $find = array('&\;', '"\;', '\;'); And I would replace them like this:...

Shell command works on command line but not in PHP exec

I have a command that when run direct on the command line works as expected. It runs for over 30 seconds and does not throw any errors. When the same command is called through a PHP script through the php function exec() (which is contained in a script called by a cron) it throws the following error: Maximum execution time of 30 seco...

Does each public property has to have accessor methods?

I am getting into OOP and I run into the following dilemma. I have the a class: class Recipe { var $title; var $time; var $ingredients = array(); var $instructions; var $category; function __construct($title, $time, $ingredients, $instructions, $category) { $this->title = $title; ... } ...

Automatically delete files from webserver

Hi, I need to delete files from a directory in my web-server and I need some script to do it automatic. And there is few more conditions which need to be fulfilled. It has to clean the directory then total file size exceeds some certain limit for example 1,5GB That files would be deleted every 24 hours. New files like 10 ir 20 mins ol...

Import Excel data in to mysql with PHP

Can somebody send me PHP code which will read an excel file and write the data of that excel file into database. It should also read multiple tabs of that excel file and perform the same operation. Thanks ...

PHP not loading custom extension

Hey all, I'm writing a custom extension in PHP and am loading the extension in the php.ini file. The extension loads and runs fine when using the command-line interface, but it doesn't load in the web server (Cherokee with FastCGI). To head off some questions before they're asked, I am definitely using the proper php.ini file(s) and I'v...

How to show 5 records in 5 different <DIV > tags using jquery PHP Mysql with Next /prev button

Hi, I have html page whicha has 5 Div tags in disable mode. what I want is Imagine I have 200 records in mysql database table Using Jquery I want to call PHP Mysql data (only 5 records at a time) When user clicks on Next button PHP page will get called Limit 6, 10 and so on if user clicks on Prev button then previous 5 records ...

Canada Post 'lookup postal code' screen scrape code

I don't want to reinvent the wheel. Is anyone aware of php/curl code to populate address data in Canada Post's 'Find a Postal Code' page http://www.canadapost.ca/cpotools/apps/fpc/personal/findByAdvanced?execution=e1s1 and return the valid postal code. I thought it would make a great address verification routine. ...

PHP mail function + ajax = frustrated me

Hi, I'm using ajax to submit a contact from without reloading the page, it works well for the most part except when I try to send the body of the message nothing gets sent. The to and subject parts work fine, it is just when the body tries to get sent I see nothing. I've tested it running strickly a php function and the body works, ju...

Is there a way to downgrade any Wordpress plugin after upgrade?

Is there a way to downgrade any Wordpress plugin after upgrade? My client upgraded all plugins and now up-gradation of some plugin creating problem. ...

How to assign a rank number to an array

Hi, I have an array of numbers, for example, myarray = (45,3,56,7,21). What I need to be able to do is rank the values into another array so for the above I would end up with myarray2 = (4,1,5,2,3). Many thanks, Adam ...