php

Basics for implementing SSL on PHP Website

Hi guys, I am here as a developer of a website. My website got different modules among which one function is to process credit card. In order to process credit card I need to implement SSL layer and process the pages. For rest of modules the SSL is optional. Now my points are: 1.) Is the location of file for http and https same? 2.)...

Comma Seperated Values and LIKE php/mysql Troubles

The Set up This is more or less a follow up question to something I had previously posted regarding comma separated values (explode,implode). Here's the scenario which has been stomping me the last few days as I'm a noob--sorry for the lengthy post. I'm passing a variable via the url (index.php?id=variable), I then check the database t...

Limiting XML read to 5 records

Hello, I have a xml file with 100 records, but I want it to limit it to just 5 records for ($i=0;$i<=5;$i++) { foreach($xml->entry as $result){ if ($result->updated == $result->published) { } } } When I put in the above code, it display one record 5 times. Thanks Jean ...

PHP script not automatically updating when moved to another server

A friend built a ranking system on his site and I am trying to host in on mine via WordPress and Go Daddy. It updates for him but when I load it to my site, it works for 6 hours, but as soon as the reload is supposed to occur, it errors and I get a 500 timeout error. His page is at: jeremynoeljohnson .com/yakezieclub My page is current...

Facebook App : Problem with storing user info

I want to store basic user info like name and proxied email into my MySQL database. Here's my code $facebook = new Facebook($appapikey, $appsecret); $user = $facebook->require_login($required_permissions = 'publish_stream','status_update','email'); $con = mysql_connect("xxxx","xxxxx","xxxxx"); if (!$con) { die('Could not connect: '...

International weather API (PHP)

I'm looking for the best (free/cheap) international weather PHP API out there. Any suggestions? ...

using cookies to provide automatic login

hi all, I have some web applications written in php , all hosted on the same server. for e,g webmail.xxx.mu forum.xxx.mu wiki.xxx.mu I want to integrate all of them in one webpage like this: *create one webpage (main page) *create one IFrame *create one navigation bar at the top of the main page. *when you click on "...

SCORM lib for php

hi all, we have developed e-learning web site for one of our customer. recently he asked he need SCORM feed. i dornt know whether my system is compatible with scrom. do any body know any opensource php tool or lib to generate scrom from existing data. thanks ...

PHP Fatal error, trying to request method inside model multiple times

The error message [23-Mar-2010 08:36:16] PHP Fatal error: Cannot redeclare humanize() (previously declared in /Users/tmclssns/Sites/nadar/nadar/trunk/webapp/application/filer/models/Filer/Aggregate.php:133) in /Users/tmclssns/Sites/nadar/nadar/trunk/webapp/application/filer/models/Filer/Aggregate.php on line 133 I have ...

Zend Form Element Decorator

How to prepend the label of checkbox element through decorator? ...

PHP UML Class diagrams plugin for eclipse?

I've searched but the questions so far seem to be Java/C# orientated. I was wondering if there was a class diagram GUI for eclipse - or it could be standalone - that better describe PHP classes? It seems that the ones i've used so far assume you are writing for Java or C#. Cheers for any pointers ...

multiple parameters without knowing the argumen total ? (PHP functions as parameter topic)

Right now, i start to learn how to process PHP function as parameter and now i have function like this. function do_action($func_name) { if (func_num_args() <= 1) { return $func_name(); } $args = func_get_args(); unset ($args[0]); extract($args, EXTR_PREFIX_ALL , "foo"); return $fun...

Get address bar without parameters.

Help me please get the value of the address bar of browser without the parameters passed. Without the use of regular expressions and string functions. You can do this? (I use php on apache). enter http://dev.mazda-parts.ru/catalogue/?spattern=1 exit http://dev.mazda-parts.ru/catalogue/ ...

Zend_Test_PHPUnit_ControllerTestCase: Test view parameters and not rendered output

Hi, I'm using Zend_Test_PHPUnit_ControllerTestCase to test my controllers. This class provides various ways to test the rendered output, but I don't want to get my view scripts involved. I'd like to test my view's vars. Is there a way to access to the controllers view object? Here is an example, what I'm trying to do: <?php class Contr...

nginx and trailing slashes on $document_root?

I use the following configuration for nginx: http://gist.github.com/340956 However, this configuration causes a No input file specified error with PHP. The only way I have been able to solve it is by altering this line: fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; Note the "/" between $document_root and $fast...

i have big problem in HTTP_REFERER

now i make simple system in my site and this its code if(stc($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])){ //download directly }else{ //open page first } function stc($haystack, $needle, $offset=0) { return strpos(strtoupper($haystack), strtoupper($needle), $offset); } if any one enterd the link from my site its download dire...

When Web page is displayed in a div, Error: Unable to modify the parent container element before the child element is closed

Hello, A url is being displayed in a div as shown below <div id="ipage"> <? $url = "http://www.yahoo.com"; $file1 = fopen($url, "r"); $content = file_get_contents($url); echo $content; ?> </div> And I receive this error Webpage error details Message: HTML Parsing Error: Unable to modify the parent ...

is there any Free international timezone API?

is there any Free international timezone API? ...

Uploading images from server using Php

In my php application i have a folder in which all the photos are kept. The images are in different sizes.So i want to select photos from the folder and applying some image functions and upload to a different folder through php code. This is same as image uploading but the difference is that the source file is in server That is i want...

It is possible to get mod_rewrite urlBase server param via php?

Could i get the apache mod_rewrite definition of urlbase via php scripting? ...