php

How to handle all URLs from 1 page using PHP?

I would like to redirect all urls from the webpage (what ever what's after the domain name) to a single webpage that will analyse the complete url and will show the good page and information. I know it's possible with Mod_Rewrite and using some PHP function to get the URL but I can't find any good webpage showing the steps and how to do ...

How to end the current loop(but not the whole while statement) in PHP?

in While(),How to skip the following nested statements and execute next loop of the while() statement? ...

Cannot Unserialize an object array in php

I have an array of Shift objects that I'm working with in PHP. I need to store these objects within a database. I'm working on a function that will add shifts to the database: $Serialized_S = get_option('MasterShiftString'); $MasterShiftArray = unserialize($Serialized_S); if(!$MasterShiftArray) { echo "MasterShiftArray returns false";...

how to transform a string to an array with # as a delimiter but only the first one?

(only the first # is a delimiter) 50#some message from me to you #1 or #2 into array ( [amount] => 50 [message] => 'some message from me to you #1 or #2' ) ...

generate multi-dimentional JSON array from PHP/MySQL

I want to create a JSON object that looks like the example below. { "Products": [ { "ProductNo": "11111", "Descr": "Myproduct-1", "Price": "225.36" }, { "ProductNo": "11112", "Descr": "Myproduct-2", "Price": "235.46" }, ...

HTML vs SHTML vs PHTML

What is the difference between: HTML SHTML PHTML Why and when i'll use which one? ...

Kohana 2.3.4 ORM update question

I'm trying to update a record using the ORM library built in to Kohana 2.3.4. I'm basically modifying the script I use to insert the record in the first place. My problem is the record is getting inserted again, not updated. Here's my script: public function edit($id) { // Find the selected blog entry $blog = ORM::factory('...

how to stop downloading of wsdl?

hi all, i have tested and implemented a simple web service for user login process in PHP using SOAP in my intranet its working fine,the same implement in online server when i tried to access wsdl file it downloaded instead of displaying it's content and also when using the soap client it displays wsdl parsing error. so kindly give your ...

free opensource amfphp alternative

Hi, is there any other framework that does the same as amfphp? I dont want to use amfphp because it hasnt been updated in years and looks like it's no longer under development, I have to use PHP so I'm looking for a PHP alternative. Thanks. ...

Php form for registered users in joomla

Hi, I am using joomla cms for my website, I need to add a php form for example to edit their profile details of registered users. I have created a separate php form to do so. I could use the wrapper module to display this form for registered users. But when i copy the link for ex, http://localhost/joomla/edit-your-profile.php , public us...

What is best way to implement a survey in Joomla?

Hi, I'm planning to create a survey form in Joomla(1.5) that will have a lot of custom fields (name,address, email, date of birth and more...). Now I want to get your opinion on the best approach to do it. Is there a plugin to easily do that? Or I should really code it from scratch? Also I want add and integrate some payment gateway...

Get all elements in array besides the first one.. ? (php)

Is there a way to specify getting all but the first element in an array? I generally use foreach() to loop through my arrays. say array(1,2,3,4,5), i would only want 2, 3, 4 ,5 to show and for it to skip 1. ...

how to parse a page that doesnot show any data in its source code??

I have to parse a page that is using javascript functions for its display and so we cant see any data in its source code.But if i save that page to my system than it shows everything in its source. Please suggest me some way out so that i can parse that page. ...

How to make PHP output a sound (beep)?

What's the PHP verson of this python code? import winsound winsound.Beep(537, 2000) ...

PHP web site that restricted access to specific country

Since IP can be spoofed, how can one build a PHP website that correctly identifies the visitor's country? ...

Best PHP Encoder

How does the php encoder works? Do they need any server side software installation? How i use them? Which one from the bellow is best php encoder? ioncube sourceguardian phpshield phpcipher truebug ...

PHP MVC Framework: Extension of View files

Hello There, I have been developing my own PHP MVC framework. Now I have seen different frameworks implementing different extensions for the View files. I am using simply php extension for my view files. Now is there anything wrong if i use php extension. Are there any merits or de-merits of it? Why use other extension such as: phtml...

Dynamically creating instance variables in PHP classes

Hey all, I'm not sure if this is a trivial questions but in a PHP class: MyClass: class MyClass { public $var1; public $var2; constructor() { ... } public method1 () { // Dynamically create an instance variable $this->var3 = "test"; // Public....? } } Main: $test = new MyClass(); $test->method1()...

Tunnel a proxy through a proxy in cURL for PHP?

Hello! I'm trying to test open proxies to figure out who to block from my site, but I'd like to do that through a proxy of my own. Using PHP and cURL, how would I go about doing so? Is this what CURLOPT_HTTPPROXYTUNNEL is possibly used for..? pseudo code: Server (IP address A) connects to it's own proxy server (IP address B), which fo...

merge student name under the same company names and only show the selected student name under that particular company

I have got something like this as a prototype and i wanted it sorted according to this. but now my code have all the student name under different companies. how i can fetch them according when this student and this company is link and only fetch them out like that? no codes done yet though. ...