php

Can file uploads time out in PHP?

Hi im quite new to PHP, i have created a form for very large csv files to be uploaded to my server. Some one mentioned to me that the browser can time out due to the uploading file being to big, is this true? and if so, can it be prevented? Thanks for your help! ...

How do PHP websites receive text messages?

Duplicate: Send and receive SMSs to a PHP script? I want to create an application in PHP which will users to interact by sending a text to some address. What can I use to complete this transaction? ...

problem downloading file

I write a script to force download mp3 files from a site. The code is working very fine but the problem is that it can't download large files. I tried it with a file of 9.21mb and it downloaded correctly, but whenever i try to use the code to download a file of 25mb, it simply gives me a cannot find server page or The website cannot disp...

Best way to handle LARGE strings of text going into a database?

Hey all, I have built a number of solutions in the past in which people enter data via a webform, validation checks are applied, regex in some cases and everything gets stored in a database. This data is then used to drive output on other pages. I have a special case here where a user wants to copy/paste HUGE amounts of text (multiple...

PHP PDO Buffered query problem

I'm having some serious problems with the PHP Data Object functions. I'm trying to loop through a sizeable result set (~60k rows, ~1gig) using a buffered query to avoid fetching the whole set. No matter what I do, the script just hangs on the PDO::query() - it seems the query is running unbuffered (why else would the change in result se...

Is Forms Authentication Ticket Decryption possible with PHP?

I'm a PHP developer who knows almost nothing about .NET. I've been asked by the .NET guys at work to translate .NET code that decrypts an authentication ticket into PHP so that the PHP code can then set the appropriate session variables for my application to run. Is this even possible? I'm staring at the code and it's baffling me. I'll k...

Is there a way to do this in one step?

$clients = $CLIENT->find($options); $client = $clients[0]; EDIT: I Realized i should be clearer. The $CLIENT->find always returns an array of objects, but I want one line of code that turns the array (that will only have 1 object) into just an object. ...

Is there a way to decode html e-mails?

I am writing support software and I figured for highlighting stuff it would be great to have HTML support. Looking at Outlooks "HTML" I want to crawl up into the fetal position and cry! Is there a php class to unscramble HTML emails to support basic HTML? I don't want to display the E-Mails in a frame because I want to work with the da...

php/dos : How do you parse a regedit export file?

My objective is to look for Company key-value in the registry hive and then pull the corresponding Guid and other keys and values following it. So I figured i would run the regedit export command and then parse the file with php for the keys I need. So after running the dos batch command >regedit /E "output.txt" "HKLM\System....\Co...

Including a PHP file, treats relative URLs from that directory.

I have a PHP file at my server root.. index.php .. which include's .. DIR/main.php Now .. DIR/main.php .. include's many nearby PHP files using relative URLs using .. include("./common1.php"); Any way I can change the relative-URL base path so when including "DIR/main.php" It can relatively access its nearby PHP files like "DIR/common...

What is the best open source PHP IDE out there?

I have been searching for the best open source PHP IDE for a while now. At first I used phpeclipse and later I tried eclipses PHP plugin but it was buggy and it seems they are not keen on really getting it working. I recently tried Netbeans PHP support and that seems the best so far. What do others use? Yes I know real men use vi or em...

Is it possible to skip parameters that have default values in a php(5) function call?

I have this: function foo($a='apple', $b='brown', $c='Capulet') { // do something } Is something like this possible: foo('aardvark', <use the default, please>, 'Montague'); ...

What does the dot-slash do to PHP include calls?

A. What does this do? require ("./file.php"); B. in comparison to this? require ("file.php"); (Its not up-one-directory.. which would be) require ("../file.php"); ...

Change relative link paths for included content in PHP

I have a PHP file at my server root.. index.php .. which include's .. DIR/main.php Now .. DIR/main.php .. has relative links to many nearby files. All the relative links are broken. Any way I can change the relative-URL base path for links? ... so the included content of DIR/main.php has all its links to friend1.php changed to DI...

Consuming PHP Web Service From C# Client

I am trying to consume a web service on an Apache/PHP server for which I only have the following example request as documentation. POST /server/service.php HTTP/1.1 Host: server.example.com ContentType: text/xml ContentLength: xxx <?xml version=\"1.0\"?> <command> <parameters /> </command> Every time I try to consume the service I...

When listing information from a database using php and mysql how would you make the first row look different to the rest?

Basically I have articles in my database and I want to alter the way the first record displays. I want the lastest (Posted) article to be the focus and the older article just to list, (see F1.com). I need to know how to get the first of my values in the array and get it to display differently but I am not sure how to do this, I can do it...

How to update a <div> with jQuery and CakePHP?

I'm using CakePHP for a small web app and on one form page there's a dropdown to select a job number. I'd like to update two text fields based on the job number selected in the dropdown using jQuery (I'm also open to using the default ajax helper but I didn't have a lot of success with it). Here's my jQuery snippet: <script> $(doc...

PHP Calendar Recurrence Logic

Before the answers start coming (which I know they will) I know that there are a million projects out there that have done this already. Having said that what I am trying to do is create an online calendar - using PHP & MySQL here is what I am planning ... tables in database ((calendar_item) id, title, start_date, start time, end time...

release a db lock when php session ends?

Suppose a user is editing a record from a database, in the schema you have a field named 'lock' so users can not edit concurrently the same record, once the user ends editing you set lock = false to allow other users to edit the record. My question is, can i run some code when php session ends, so if a user walks away from computer, clo...

Stripping $ from php values

I have a form where users can enter the amount they spend on their phone bill and then I tell them how much they could save if they switched to vonage, skype etc. I pass the value "$monthlybill" in the url and then do some math to it. The problem is that if the user writes "$5" instead of "5" in the form, it breaks and is not recogni...