php

How can the leecher do this?

The original website: http://www.vnedoc.com The leecher's website: http://www.vipa1.com As you can see they are completely the same except for the author (sangsang -> trangxinh) and the logo (v.v.v). How could the leacher do this? How can I prevent this? ...

Direct Upload Zend PHP: How do I disable comments on videos being uploaded?

Here's a sample of my code: $httpClient = Zend_Gdata_ClientLogin::getHttpClient( $username, $password, $service, $client, $source, $loginToken, $loginCaptcha, $authenticationURL); $httpClient->setHeaders('X-GData-Key', "key=${myDeveloperKey}"); $yt = new Zend_Gdata_YouTube($httpClient); $myVideoEntry = new Zend_Gdata_YouTube_VideoEntr...

PHP while loop omits first entry from MySQL database select

I have four rows in my table. Only three are shown. $query = "SELECT * FROM table"; $result = mysql_query($query); $row = mysql_fetch_array($result); while($row = mysql_fetch_array($result)) { echo $row['id']; } The result is 234, but should be 1234. What am I doing wrong? ...

Centos x86_64 PHP 5.2.14 SQLITE missing? (WEBTATIC repo)

Hello, i allready updated php on my server to version 5.2.14 from webtatic repository (http://repo.webtatic.com/yum/centos/5/x86_64/). But i can't find SQLITE. Can someone help me? ...

Decode Footer Link

i have a free theme on my wordpress. but it have links on its footer. and when i see its footer.php i see only like this..: <?php eval(stripslashes(gzinflate(base64_decode("dVLLboMwEDwTKf+wyqEhF7g3lKh/UCWRqkpIyOAltgQY2U5IpH58/YBAk5YL652dnd2xd+lyAbNvOiUx5ZcBHePlIkhMBJy+ZatC0Fsu+YnpbDXrMhUoTrEgMidUmYpk17EOeBVW57bUXLQ5XrnSKszWmmGDtixXTPTZe...

why is mod_rewrite facility working?

I am trying to do simple rewriting url with using mod_rewrite facility of Apache. As they said i firstly remove the # from the LoadModule rewrite_module modules/mod_rewrite.so from conf. file. then i restart my apache. now what i want is something like this... on my index page there is one menu in which their is one link of "aboutu...

PHP: exif_read_data

How do I return the comment property from exif_read_data link: http://www.php.net/manual/en/function.exif-read-data.php ...

How to hook up mysql to my website?

I am runing linux mint. I have a mysql db called Test. Do i need apache or something to hook it up to my db? When i try to do my php myqlconnect i get this: Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Any ideas? thanks! ...

How does typekit.com work ? @font-face

How does typekit.com work ? There are many site like typekit allow css designers to use custom fonts ? but how ? How can I make a site like typekit ? What technology is used ? Are there any open source ? ...

In server the site is not loading which is developed using PHP and MYSQL and with smarty Framework

Hi all, I developed a project using PHP as FRONT END and MYSQL as BACKEND using SMARTY FRAMEWORK. In my localhost the site is working perfectly. But in server it doesn't load. Here is the URL : http://utovglobal.com/new_mandapam/ I give permissions to all the folders. Even it didn't work. Any suggestions or help will be thankful an...

wordpress - action hook 'pre publish post'?

Hi all, need to change post content before it is published. I could overwrite the native publish function but don't want to do this. What i'd like to do is something like: add_action('before_publish_post','my_func'); function my_func($content){ $content = "new content"; return $content; } I have had a look at the 'publish_po...

MongoDB pull array element from a collection

Hi, I have a mongodb object as follows: array ( '_id' => new MongoId("4cc97fb0247ae8747ec5fefb"), 'posts' => array ( 0 => array ( 'comment' => 'Eamorr', 'fromUname' => 'Eamorr', 'time' => 1288273840, 'UTC' => '2010-10-28T14:50:40+01:00', 'ip' => '127.0.0.1', 'id' => '123lasdfiqwoei28a...

How does the method syntax "public function direct(){}" work in PHP?

I'm learning Zend Framework at the moment and came across the following syntax. class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_Helper_Abstract { /** * Perform a redirect to an action/controller/module with params * * @param string $action * @param string $controller * @param...

How to create a JSON rest webservice in php without using any library ?

I want to create a hello world json rest webservice in test.php: <?php header("Content-type: application/json; charset=utf-8"); $test[] = "hello"; $test[] = "world"; $json = json_encode($test); echo $json; ?> But nothing is returned when I test it with ajax below why ? <html> <head> <script> function ...

PHP: How to create a file encoded as "UTF-8 without BOM"

Dear programmers: As I guess, most of you know that we have the following encodings for files: ANSI UTF-8 UTF-8 is recognized by adding three chars at the beginning of the file but those chars causes some troubles in PHP Language as you know So we use UTF-8 Without BOM (Instead of UTF-8) Here is my question: How can we write a n...

OOP related question

Hi! I'm trying to improve my understanding on OOP^^ If I call this file... set_organization.php file: $organization = new Organization( ); $organization->name = 'Name here'; $organization->founder = 'Founder here'; then I access it again, are the name, and founder already set? Or should I put unset to ensure it's empty, like fresh s...

custom module links not appear after upgrading the magento. it will work on local machine but not work on live?

Hello, I have one big issues don't know due to my mistake or magento's structure. i have update the magento to 1.4.1.1 and all work fine on my local machine but when i have moved it to live then in admin custom module's link are not appeared . i have also tried for clearing the cache and re login but it wont work.. can any one help?? ...

How to Highlighting Search Results Using Apache SOLR with PHP code

Hi, I developed search page using SOLR with Tomcat servlet container. Using PHP code I post the search query into solrQuery() function and In this function have defined query parameter as follows. $query = "?q=".trim(urlencode($q)) &version=2.2&start=0&rows=10&indent=on&hl=true&hl.fl=title"; I have passed highlighted "hl=tru...

Installing Joomla on Ubuntu

I am trying to locally install joomla on my laptop. I have apache2 installed and working. When I go to localhost:8080 I get to the Joomla's install page. This is what I see PHP Version >= 4.3.10 Yes - Zlib Compression Support Yes - XML Support Yes - MySQL Support No MB Language is Default Yes MB String Overload ...

"Body Onload" to send "ScrollHeight" not working properly in Chrome and Safari

I just asked a question here, about why an iframe_resize function wasn't working. After troubleshooting, I found out that the problem is not the function, so I am posting a new question. I have an index.html with this resize function: function resize_iframe(new_height){ document.getElementById('iframe001').style.height=parseInt(ne...