php

Can you use a C# library in a AMP-server?

Is it possible for me to build some database functionality in a C#-library (using LINQ 2 SQL) and then somehow import it into a php (joomla) project? ...

Bold the first two words from a sentence

Hello guys, In PHP, how can I bold the first two words from a sentence? Thank you! ...

stream_socket_client error in php

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection timed out) in /home/biranchi/public_html/push.php on line 42 Failed to connect 110 I am using the certificate, and the private key $ctx = stream_context_create(); stream_context_set_option($ctx, '...

Source code indentation and highlighting on server side?

I need to do source code formatting (similar to what Stack Overflow does), but on the server side. What options do I have? My serverside language could be PHP or JSP. Does google have a server version of syntaxhighlighter? ...

How to return all result rows resulting from a SQL statement execution to the page where the AJAX request came from

How to fetch all result rows in MySQL+PHP? You know, if I use mysql_fetch_assoc() , it only returns one result row as an associative array. I am using AJAX to fetch the data in a MySQL table. $result=mysql_query("select * from questions where announcementid='$taskid'")or die(mysql_error()); How to return the value of $result which i...

3-way merge in JavaScript or PHP

Does anyone know of an Open Source three-way merge implementation in JavaScript or PHP? I want to merge plain text files without the need to rely on any server side binaries. I found a few solutions for creating diffs, but no merge implementations. ...

select and echo a single field from mysql db using PHP

Im trying to select the title column from a particular row $eventid = $_GET['id']; $field = $_GET['field']; $result = mysql_query("SELECT $field FROM `events` WHERE `id` = '$eventid' "); echo $result; all i get is Resource id #19 How should i do this? What is best method? ...

What PHP command would peek into a page and record its HTML code (source)?

Hello, everybody!!! Would you, please, tell me what command (or a combination of those) in PHP would check a web-page by its URL and possibly download its code (HTML) into a variable? Well, I was suggested to use Goggle App Engines for this here, but I am also quite q curious about how much of that task can PHP perform. ...

Build date range...

I have a start date of 20090101 and an end date of 20091130 and I'm trying to build and array of all the months in between, which would look like this: <?php /* ... */ $arrDates['Jan'] = 2009; $arrDates['Feb'] = 2009; $arrDates['Mar'] = 2009; /* ... */ ?> How can I do this? ...

break apart formatted date into individual month/day/year hour/minute/second in php

I have a date in the following format November 18, 2009, 3:00PM How can i break that up so that i can store each value as its own variable? such as... $month //November $day //18 $year //2009 $hour //03 $minute //00 $ampm //PM ---------------Solution---------------- $startdate = "November 18, 2009, 3:00PM"; list($month,$day,$yea...

Cakephp Session lost in Flash player

Just want to know if anyone have the same problem. The website need to login to perform certain task. We use stock Auth component to do the job. Everything is fine until it hits an interface which build in Flash. Talking to Amf seems fine. But when the Flash player try to talk to other controller - got redirect because the session in n...

How can i do select multiple rows ( allowMultipleSelection="true" ) in datagrid using flex ?

I have id(array) used in my application . i want to select number of rows mathching given array but if i used gatagrid selected Index then it will be selected only one row only . i set data grid allowMultipleSelection="true" also .. . how can be select mutipule rows in datagrid ? please refer me for(var i:int=0;i<id.length;i++) { ...

How to read all values in an array returned by a PHP file using AJAX?

I am using AJAX to fetch a multidimensional array, so a multidimensional array is returned to AJAX, how can I deal with the data with AJAX? I need to read all values in the multidimensional array. I use the following code to return the array to AJAX. $resultset=array(); while($row=mysql_fetch_assoc($result)) { $resultset[]=$row; } p...

PHP Complete Object Graph not stored in Session

Hello, I have read other posts on stack overflow on the issue but my question is a little different.. When storing an object in the Session does PHP save the Complete Object Graph in the session? I am having problems accessing some of the properties of the Object AFTER it is read from the Session. The object i am storing has complex...

Which is the best book for learning Symfony?

Apress The Definitive Guide To Symfony Symfony Book Or Some Other Book. ...

php emailer link after submit button is clicked

How does one link to the submit button, I am thinking of embedding a or just using href or actually have the entire php emailer code embedded somehow inside the submit section? I can submit the information supplied by a user to a MySQL database and log it there; however, I was just wondering if there is a more elegant way to send emai...

How to remove diacritics from text?

I am making a swedish website, and swedish letters are å, ä, and ö. I need to make a string entered by a user to become url-safe with PHP. Basically, need to convert all characters to underscore, all EXCEPT these: A-Z, a-z, 1-9 and all swedish should be converted like this: 'å' to 'a' and 'ä' to 'a' and 'ö' to 'o' (just remove the...

Php to print using dot-matrix printers

Hi all, i am workng on a project that will end up printing recpts, my client uses a dot-matrix printer (some old version). He will need a system where rcpt printing will be fast i.e. time efficient, and not opening a dialog box and choosing a printer...moreover the printer will be shared through a network. the main problem is that all t...

How to make a server send a processed data back to the invoking iPhone?

I am sorry if the title is unclear. Allow me to elaborate further. Firstly, I have an application on an iPhone that will allow the user to upload a data to server. We simply use php to allow the user to upload the data. Secondly, the server will process this data and then return the processed data back to this iPhone. This part is the ...

PHP Combo Box AJAX Refresh

I have a PHP page that currently has 4 years of team positions in columns on the page. The client wants to select the players in positions and have first, second and thrid choices. Currently the page shows 4 columns with sets of combos for each position. Each combo has a full set of players in it and the user chooses the player he wants ...