php5

How To Encrypt The Source Code Of PHP Files

How can I encrypt the source code of PHP Files? I have used some proprietary software which have their source code encrypted. Plus the encryption code also makes the execution faster. How can this be done? ...

get latitude and longitude from gps device with php

How to get latitude and longitude of gps device with PHP? and not through javascript. Thank you. ...

Text to image conversion

I have made a 7project in which i have to convert text into image i have done it & save image also. but i have a problem when i use new line in text then in image content are not come in new line it will dis7play in a line only But i want if user use new line tag then there should be new line in image also you can see the output at ...

Date Time create from format

Hi, I want to create date with specific format for e.g 03-20-2010 have a format of m-d-Y but date function do not understand this date and returns wrong date $date = date("Y-m-d", strtotime("03-20-2010")); Above code is returning wrong date, what is the reason behind it and how to avoid wrong result? Few formats that I want date funct...

Safe Encrypt/Decrypt Functions

Given an input string (will actually be an integer value) and an encryption key, I need to encrypt the input string in such a way that the resulting string is: URL safe (my permitted URI characters is currently: a-z 0-9~%.:_-) Filename safe (meaning, it only uses valid directory/filename characters) FTP account username safe Email acco...

mod rewrite rules help please

hello , i made a script .. and i want to make it's all urls to be seo friendly .. my current php urls is : index.php?lang=ar&option=a&option_m=band variable option&option_m are optional so i want convert this url to /ar/a/b or /ar/a or /ar and i want ask about if the page have form with GET Action ,, how to accept the query ...

date to time ago ? without useing strtime ?

ok i have a date date('Y-m-d H:i:s'); how can we make it like 0 seconds ago or x year x month x day x minutes x seconds ago ? but without useing the str_time ( php 5.3.3 ) edit* i mean is some.date - time.now = someyear some month someday someminutes someseconds ago. like facebook or stackoverflow ( updated. i mean like that. – Adam...

Is w3schools PHP certification have value in market(in india)??

Is w3schools PHP certification have value in market(in india)?? for getting job. ...

Zend_Rest_Client problem with sending XML content with encoding type specified (content-lenght is 0)

I would like to sent request to our clients server, but they require to send XML as application/xml I was trying to use setEnc() method but I've got error on unsupported content type, so then I've tried to se setRawData() as they suggested: self::getHttpClient()->setRawData($XML, 'application/xml'); $this->restPost($this->getPath());...

calculate amount on dates difference

i have one table with two columns as shown in picture at the execution of page user enter the start and end date. now what i need to calculate is total amount. for example, if user put start date: 18-jan-2010 end date: 23-jan-2010 then he has 2 dates in first options (20$) and 3 dates in second options (26$) so total...

Using a class in PHP4 and i don't know how to set a method

in PHP 5 it would be class Example { private $foo = "old data"; public function __construct(){} public function setVar($data){ $this->foo = $data; } public function output(){ return $this->foo; } } $var = new Example(); $var->setVar("new data"); echo $var->output(); I never learned OO in PHP 4 and am having tr...

Apostrophe CMS: Hosting questions + feasible to get into without Symfony experience?

I am looking for a clean, well-built CMS. I want to migrate a number of sites away from a self-built CMS which I will not be developing further. I've come across Apostrophe and instantly fell in love with the great, integrated user interface. It is based on the Symfony framework, which I have practically no experience with. My ques...

How to connect to facebook

I have made a site in which i have to connect to facebook site such that when user click on registration form in my site then a popup will open of facebook site login page & when he login in facebook site then he will login automatically in my site also. I have no idea how can i start this in my site. please help me. thank you ...

php get results on same page

Hi all, I Have a php form page where users fill the data and process page to add data to database, Its working fine, But problem is I need the results from process page to be displayed back on to my main page? How to get results back to main page?? .. ...

PHP DOM UTF-8 problem

First of all, my database uses Windows-1250 as native charset. I am outputting the data as UTF-8. I'm using iconv() function all over my website to convert Windows-1250 strings to UTF-8 strings and it works perfect. The problem is when I'm using PHP DOM to parse some HTML stored in the database (the HTML is an output from a WYSIWYG edi...

How do I get new video release into my website

I am wondering on how do I get to show movies, tv series, anime etc. that came out on DVD's to my site l;ike http://www.blockbuster.com/ does. Can i just feed it off IMDB or any other solutions? Thank you ...

PHP: Needing regex to camelCase a dashed/underscored string & test result against native PHP functions

Hello Folks, I'm trying to streamline this method down. It basically takes in an action (string), makes dashed/underscored strings into camelCase and then tests if the result is equivalent to a native php function, if so it gets an underscore in front. I'm thinking all this could be one regex but I'm not sure how I'd test function_exist...

PHP Question: create $variable from only part of the output.

Hola! Long time reader, first time asker. Im hoping you folks can help me solve my problem? I have a php script that looks like this: system("$command $location"); and that part works fine. However, I would like to then take the results and run another, different $othercommand on the results. I tried doing something like this: $vari...

Configuration settings transfer from developer machine to production

Hello All, Thanks for your time. I am new to Drupal. I am working on a website and lets assume I am testing 10 modules and select that "X" module suits me well. Now I configure this module to my requirements and then see that this suits the project really well. As you know some modules like profile module may have 10's of form fields whi...

Is there an equivalent of C#'s verbatim string literals in PHP ?

I know I can create a verbatim string literal in C# by using the @ symbol. For example, the usual String path = "C:\\MyDocs\\myText.txt"; can also be re-written as String path = @"C:\MyDocs\myText.txt"; In this way, the string literal isn't cluttered with escape characters and makes it much more readable. What I would like to k...