php

Do any sites using MVC frameworks ( php, python ) post their full source through a VC browser?

I recall Django had its source online awhile ago, I'm just looking to study how a fully functional site operates - I don't mind looking at any type of Python/PHP based MVC framework such as Pylons, Django, Zend, or Kohana. ...

How can I set the value of a textbox through PHP?

So I have this empty textboxes in a registrationg page. The user enters some data, hits continue and then there's a confirmation page. If the data is incorrect, the user hits go back to go correct whatever was wrong. However, when he goes back, all the textboxes are empty. So the first thing that comes to my mind is to store the user dat...

Creating and updating Zend_Search_Lucene indexes

I'm using Zend_Search_Lucene to create an index of articles to allow them to be searched on my website. Whenever a administrator updates/creates/deletes an article in the admin area, the index is rebuilt: $config = Zend_Registry::get("config"); $cache = $config->lucene->cache; $path = $cache . "/articles"; try { $index = Zend_Searc...

PHP gzinflate() in C?

Hi guys! I'm trying since several hours to implement the behaviour of PHP gzinflate() in C. In PHP it's just: gzinflate($str); In Python it's: import zlib ... return zlib.decompress( decoded_data , -15) ... But I just don't manage to implement it in C. Can anybody help me with that? I'm really stuck.. I tried to do something with Zlib ...

Need help with simple preg_match/preg_replace regex in php

I'm trying to do a simple task of altering thousands of music video embed codes with a common with/height. For example, I have the following code: <object width="480px" height="407px" > <param name="allowFullScreen" value="true"/> <param name="wmode" value="transparent"/> <param name="movie" value="http://mediaservices.mys...

Good method to do text with links in gettext?

I'm currently doing internationalization with gettext using PHP. I was wondering if there were any good methods for this example: By using this website, you accept the <a href="<?php print($dir); ?>/tos/">Terms of Use</a>. For en_US, this sentence would follow such a format. However, in another language, the link "Terms of Use" coul...

PHP to Excel, not allowing more than 255 characters?

Hi all, I'm using the following code to create an xls file from php. http://www.appservnetwork.com/modules.php?name=News&amp;file=article&amp;sid=8 However, for some reason if the row "comments" is more than 255 characters, it doesn't output anything.. The code which writes the String to the XLS file is: function xlsWriteString( $Row...

Looping and file_get_contents in PHP

Hello, I have written a page that will scan a site and then extract certain code from the source. That part is working successfully, however I want to run this over multiple pages and dump the details into a database. I am stuggling to get the loop working, this is what I currently have (please be gentle this is my first attempt at anyt...

Twitter background upload with API and multi form data.

Taken from the Twitter's API section. Why do my image uploads always fail? The image update methods require multipart form data. They do not accept a URL to an image not do they accept the raw image bytes. They instead require the data to be delivered in the form of a file upload. Has anyone came to a conclusion with th...

Need help in display members name when logged in using PHP?

for some r.eason I cant display a logged in users name when they are logged in? the code is below <?php if (isset($_SESSION['user_id'])) { echo '<?php if (isset($_SESSION[\'first_name\'])) { echo ", {$_SESSION[\'first_name\']}!"; } ?>'; if ($_SESSION['user_level'] == 1) { echo 'something else'; } } else { echo 'something'; } ?> Th...

how to make secure dynamic update via ajax timer

hi guys, currently i am in browser game project, quite similar to mafia wars or restaurant city(in facebook) we are using php jquery and CI to build this game my question is how to make secure dynamic update via ajax(e.g in mafia wars, it is stamina that if you spent some, the game will show you "more in 04:00" and if you wait 4 minut...

php headers - post and follow

Hi all. Could someone help me on how to post variables and follow the post to that page? Regards Phil ...

How do I hide HTML tags with PHP?

How do I hide the html tags when the user is not logged on for the users name to be display? <li><a href="#" title="#"><?php if (isset($_SESSION['user_id'])) { echo $_SESSION['first_name']; } ?></a></li> ...

PHP: How to get Sunday and Saturday given a date input?

Hi Guys, How can I get the Sunday and Saturday of the week given a specific date? For example: input: Monday, September 28, 2009 output should be: Sunday, September 27, 2009 12:00 AM - Saturday, October 3, 2009 11:59 PM I am thinking of using the date, strtotime, mktime and time php functions. If you have a usable func...

Could any one explain What is FEDEX ACC # and Meter # in FEDEX Integration

ship file is: include('fedexdc.php'); // create new fedex object //$fed = new FedExDC('FedEx ACC #','Meter #'); $fed = new FedExDC('...','...'); // removed possible personal data $ship_data = array( 75=> 'LBS' ,16=> 'Ma' ,13=> '' ,5=> '' ,1273=> '01' ,1274=> '01' ,18=> '' ,15=> 'Boston' ,23=> '1' ,9=> '02134' ,183=> '' ,8=> 'MA' ,117=...

inserting variable into table

Hi, I am able to generate the activation_key in the following code. But I can't manage to insert it into the table. Blank value gets inserted into the table. What am I doing wrong? (using PEAR text password and other extensions) $activation_key = Text_Password::createFromLogin($data['email'], 'rot13'); $s...

text flowing out of border in pdf

I have created a pdf using tcpdf in php. i have a table with one row and one column. when i put the content from a form which is a textarea, the content in the form flows out of the table border. how can i make it so that it is contained in the border itslef??? ...

PHP Logout Problem?

when a user logouts from my web site they are logged out but on the logout page there username and the log out link and profile link are still visible on the logout page but not on any other pages. All I want to know is how do I change the logout page so that the log out and proflie links and username are not displayed like the rest of ...

PHP framework to develop .mobi sites

I'm desperately looking for a PHP 5 framework that will work best to develop .mobi sites. One major feature that it should contain is browser recognition for different handsets, so that the site will work properly on all types of phones? ...

Losing form data when clicking the back button on browser

Hi , When I click back on any browser I lose all the data which was inputted in the form on both drops downs and text input types. Is this a server , Browser or a coding issue ? Thanks ...