The goal is to unserialize a PHP serialized string and get sutable object in C#
Is there any way to make this possible in C#(.Net)?
To be more specific:
We need to make an application which comunicates (Via HTTP) to specific website which returns the needed information. Fortunately/unfortunately we dont have permission to website so th...
I'm looking to implement fuzzy search for a small PHP/MySQL application. Specifically, I have a database with about 2400 records (records added at a rate of about 600 per year, so it's a small database). The three fields of interest are street address, last name and date. I want to be able to search by one of those fields, and essentiall...
I have a form created with 2 fields and a submit button. But i want to do the same thing using Curl.
i tried it by using following code:
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields);
$result = curl_exec($ch);
curl_close($ch);
$fields included t...
I have the following Encryption Classs in php
define(ENCRYPTION_KEY,"abcdegef");
define(INITIALIZATION_VECTOR,mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB), MCRYPT_RAND));
function EncryptString($input)
{
$encrypted_string = mcrypt_encrypt(MCRYPT_DES, ENCRYPTION_KEY, $input, MCRYPT_MODE_CBC, INITIALIZATION_VECTOR...
Hi,
I have a game site developed using flash and php. The php code contains 4000 lines and it will run as a cron. Inside the code, there is one while loop which will run infinitely for checking any data is written in the socket and call different functions accordingly and will send the results back to the sockets. From flash, it will g...
Let's say, that we have:
$pages = array(
array(
'controller' => 'controller1',
'label' => 'Label1',
),
array (
'controller' => 'controller2',
'label' => 'Label2'
),
);
$container = new Zend_Navigation($pages);
When user clicks Label1, controller1/index action is rendered and La...
Hi,
I wrote a script in php which reads two files and takes all the strings from one file and searches them in other file. This is working fine in web browser. But when I try to run it through command line, it says
'invalid arguments supplied for foreach() at line....'
am I missing anything?
<?php
$filename = 'search_items.txt';
$fp ...
the normal number is 10000
i want it 1,000
how i can do it
thanks
...
I'm seeing a huge performance decline in a (command line) PHP script, caused by a simple assignment (runtime increase from 0.8 ~ 0.9 seconds to 29.x seconds).
The script first fetches a lot of data from a MySQL database and creates objects of different custom classes. After this fetching (php now uses around 500 MB of RAM) I loop an arr...
Hi,
I operate a PHP-based website in which there are several disjointed parts: a vBulletin forum, a help desk ticket system, a knowledge base, a large sales database (with license keys), and a gallery. In the future I plan on integrating all of these into a single customer backend, where they can for instance view their license key, sub...
I'm trying this:
function send_sms() {
$liveQuery = $this->db->get('liveList');
$counter = 0;
foreach($liveQuery->result() as $row):
$counter = $counter+1;
echo("Not hatin', just iteratin'. Message " . $counter);
endforeach;
}
When liveList has 8000 records it runs just fine, but when I try with 9000 rows it generates a downl...
Hi,
I'd like the ability to list the category name alongside the product in the New Order transactional email like shown in the screenshot below.
Any help would be appreciated.
Thanks.
...
Is it possible to use array_map() to test values of an array? I want to make sure that all elements of an array are numeric.
I've tried both
$arrays = array(
array(0,1,2,3 )
, array ( 0,1, "a", 5 )
);
foreach ( $arrays as $arr ) {
if ( array_map("is_numeric", $arr) === FALSE ) {
echo "FALSE\n...
I'm looking for a code snippet manager per the following:
Usable on Windows
stand-alone product
desktop-based (not online)
Free or paid
Has PHP syntax highlighting
I've found the following, but they don't seem to quite ring the bell (although they are good products):
-- Snip-It Pro (not free) -- Has syntax highlighting, but seems "n...
$value='x-Cem-Date:Wed, 16 Dec 2009 15:42:28 GMT';
Right now I have:
$value = preg_replace('/(^.+)(?=:)/e', "strtolower('\\1')", $value);
this outputs
$value='x-cem-date:wed, 16 dec 2009 15:42:28 GMT';
it should output:
$value='x-cem-date:Wed, 16 Dec 2009 15:42:28 GMT';
...
Hi All,
I'm currently using cURL to upload a file from my server to S3 using AJAX to call the script.
So I have the following:
$fullfilepath = '/server/sitepath/files/' . $_POST['file'];
$upload_url = 'https://'.$_POST['buckets'].'.s3.amazonaws.com/';
$params = array(
'key'=>$_POST['key'],
'AWSAccessKeyId'=...
In another question, there are the following lines:
$value='x-Cem-Date:Wed, 16 Dec 2009 15:42:28 GMT';
$value = preg_replace('/(^.+?)(?=:)/e', "strtolower('\\1')", $value);
// yields 'x-cem-date:Wed, 16 Dec 2009 15:42:28 GMT'
That (?=:) bit indicates a search for the colon, it has to. But, I don't understand that particular syntax, w...
I need to deploy Zend Framework app on Ubuntu.
I've downloaded Ubuntu desktop, installed using apt-get apache+php+mysql,
but PHP turned out to be not the latest 5.3, but 5.2.1 and even
mysql extension is missing.
I understand I can get somewhere a fresh php installation, get dependent libs (like curl or libxml2) compile them one by one...
Hello -
I'm running Apache 2.046 with PHP 5.x and I am experiencing very odd behavior on a CodeIgniter app.
The frustrating thing is that it is not consistent.
Occasionally when I call up my app Apache returns nothing. I mean nada. But then I hit refresh and everything works as expected. Sometimes I have to hit "refreash" several ...
Hi guys !
I am trying to put a symfony project on a client server for production.
The website worked fine on our company's server, but now i have this error :
500 | Internal Server Error | Doctrine_Connection_Exception
PDO Connection Error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql...