php5

What to use for building a service tier in PHP?

I come from a MS / C# / .Net background, and am accustomed to everything that the .Net Framework has to offer, including WCF. When building a service tier in .Net, the choice of what framework to use is easy: WCF. WCF gives you the ability to write something once, and the flexibility to expose that functionality in multiple ways and in...

PHP String Contains with Shadowbox

I'm using shadowbox to display media based on URLs from a database. Some of the media are images and some are websites and some are flash movies I wish to check if an image contains "http://" meaning it's a website (all images and flvs start with "media/"), and if it does contain http:// then I wish to display it at a different size. ...

How to add a new header menu in wordpress?

How to add a new header menu in wordpress? ...

Which framework is the most friendly for shared hosting environment?

I am currently comparing available web frameworks to be used for my next projects. The only criterion I need are speed and portability, i.e shared hosting friendly. I have tried Ruby on Rails, but its speed/performance is not good enough for me. I am interested in Django, but I think it is not that friendly on shared hosting - correct m...

ebay API need a quick solution

I need to know how to buy an item using ebay API. Here is the reference http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/PlaceOffer.html but I dont have a clue how to do that. What I have is the item ID from ebay in my database table ebay_items having column item ID. please tell me step by step how to do that and any help will b...

JSON_encode adding too much stuff! How do I filter it all out?

I'm calling in values using PHP to cURL a site's API. I'm able to pull the data in and put into an array just fine, but when using JSON, one of the attributes ($title) comes back with too much data. For example, if I just do echo $new_array[27]['title']; -> I get "Event Name" but if I do echo json_encode($new_array[27]['title']); ...

SOAP Client On Dreamhost

Hi Everyone I really really need help. Been trying to get this on and off for over a month now and still no luck. I need to enable the soap php extension in Dreamhost. Preferrably the native PHP soap, but something like NUSOAP will do too, just have no idea how to make it happen and how to use it. Someone please help. Thanks! ...

phpvideotoolkit offset error

This is the error i'm receiving. Notice: Undefined offset: 1 in /Library/WebServer/site/phpvideotoolkit.php5.php on line 813 Notice: Undefined offset: 0 in /Library/WebServer/site/phpvideotoolkit.php5.php on line 814 This is the line code see commented line ERROR HERE $data & $fps_value line // match the video stream info pre...

search for a sentence in a paragraph

Hi How can I search a paragraph for one or more sentences using PHP ? Thank you ...

PHP: Choosing ORM for future expansion and changes?

Hi everybody, I come from a Codeigniter MVC background that we've been working with for some time now. It's time to roll our own framework for a big project, but we have come now to the Database part and got a bit confused immediately. In Codeigniter, we've used the ActiveRecord for all SQL database connections, which has worked well, b...

Jquery Validations when using Zend Framework

I am Using zend Framework-1.7.2. when I am Updating Account Information of logged in user that time I am using jquery validations. But the script is not working. How to use it? Please, anyone can help me ? I am not using Zend Jquery Plugin. I am using seperate Jquery script like we are including and using in any simple php project. ...

How to get different templates for each page

Hello guys I have to crate a simple CMS using drupal, It has 4 pages and each page has unique design. How can I achieve this? Thank you ...

Problem writing UTF-8 encoded file in PHP

Hi all, I have a large file that contains world countries/regions that I'm seperating into smaller files based on individual countries/regions. The original file contains entries like: EE.04 Järvamaa EE.05 Jõgevamaa EE.07 Läänemaa However when I extract that and write it to a new file, the text becomes: EE.04 Järvamaa EE...

[PHP 5] Create a REST service

I want to create a REST service with PHP 5. I'd appreciate it if people would recommend some guides/tutorials on the subject. I'd like tutorials that cover the whole process, including the creation, securing and deployment of the service. Thanks. ...

Creating an interface in PHP, which can specify a type to determine which class to use

Hi all, I'm creating an interface for "PickupPoints", Each pickup point needs to be able to return all pickup points found and the pickup point details and maybe in the future more information. That's okay with the code below: <?php interface iPickupPoint { public function getPickupPoints($countryCode, $postalCode, $city); pub...

php cygwin ? how to shell_exec

ok i know this is stupid but atleast im trying :) $result = shell_exec('C:/cygwin/bin/bash.exe /c --login -i git'); var_dump($result); somehow i cant get git command from cygwin, anyone ? Adam Ramadhan edit* it should give usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path] [-p|--paginate|--no-p...

[function.file-get-contents]: failed to open stream

hello file_get_contents() is returning "failed to open stream" when I call it on a Facebook access_token URL. Warning: file_get_contents(https://graph.facebook.com/me?access_token=xxxxx) [function.file-get-contents]: failed to open stream: No such file or directory in /home/manorlog/public_html/index.php on line 109 If I try to manual...

Anyone know of a good CURL wrapper for PHP that can be extended upon?

Specifically I am looking for a good OOP PHP CURL class that can be extended to maybe have multi threads and proxy support. Thank You ...

PHP Fatal error: Call to undefined method mosMenu::mosDBTable()

I have a Mambo CMS web site hosted with 000webhost. The site is powered by Mambo 4.6.2. and PHP Version 5.2.13 is installed on the 000webhost web server. The web site runs fine. I've upgraded the OS of my development machine to Ubuntu 10.04 since I last worked on the site, and the site no longer works. This machine has PHP Version 5.3.2...

PHP:Internal Server Error using WAMP (at startup)

i had a problem wth php.It display error like below.It work well in other computer.but when i tried to run it in another computer it display error like below.I think i had a problem with my wampserver 2.0 configuration/setting. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete...