php

Jquery UI : date picker. How to set date in date picker by $_GET

Hello, I can't find how I can set $_GET variables to set manually the date in the date picker. http://jqueryui.com/demos/datepicker/ ( example : http://www.something.com/?day=21&month=2&year=2010 ) Is that possible ? Thanks ...

42S22 SQL error: Column not found, why?

This is my SQL: SELECT `tbl`.*, 123 AS `test` FROM `tbl` GROUP BY `test` It works when I run it directly in MySQL. But PDO says: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'test' in 'field list' Why so? How to cure this problem? I'm using Zend_Db. ...

Display PHP Query Array in the table

Hi all I would like to display my Query from Mysql on the table. However, my data is like this: Array([0]=>data1, [1]=>data2, [2]=>data3,[3]=>data4,[4]=>pic1,[5]=>pic2,[6]=>pic3,[7]=>pic4); I want to display my table as |data1 | data2 |data3 |data4 |pic1 | pic2 |pic3 |pic4 I know how to display the data in the single ling like...

Storing Video and Indexing Content

Revisiting this in case someone has a suggestion: I've been asked to either create or find a system that meet the following requirements... 1) Allow upload of video files - Current solution: PHP to upload to a directory above the web root, and then I'll verify users before allowing access to stream. 2) Tag the files with meta info abo...

Escape arguments for PDO statements?

New to PDO - do I need to escape arguments I'm passing into a PDO prepared statement (such as the following): $_GET['name'] = "O'Brady"; $sth = $dbh->prepare("INSERT INTO users SET name = :name"); $sth->bindParam(':name', $_GET['name']); $sth->execute(); ...

How to correct PHP path for codeIgniter plugin?

Hi everyone, I have tried by myself to install Rediska (Redis PHP client) into my codeigniter application, but without any success. I'll get insane amounts of "No such file or directory"-errors when trying to put it into the plugins folder of Codeigniter: Severity: Warning Message: require_once(Rediska/Connection/Exception.ph...

How do I create a soap client?

I need to create a SOAP client. The SOAP client should access services exposed using SOAP messages. It performs dynamic bindings and executes methods at remote web services. Soap methods are: getTodoList(acronym) -> List of TodoData() getTodoOneDay(acronym, date) -> List of TodoData() createTodo(acronym, time, note, priority) -> String...

fopen won't open files across network

I can use fopen to open local files but can't open files across network on a different machine. I can map the drives and look at the files but can't open them using fopen. ...

PHP error_log() not writing to disk in cron job

When running PHP scripts as cron jobs, the error handler works but the error_log() function doesn't write to disk. I included these lines in the script run through cron in case it was because the php.ini values weren't getting picked up, but still no output to the error log. ini_set('display_startup_errors', 0); ini_set('display_errors...

What's the fastest way to scrape a lot of pages in php?

I have a data aggregator that relies on scraping several sites, and indexing their information in a way that is searchable to the user. I need to be able to scrape a vast number of pages, daily, and I have ran into problems using simple curl requests, that are fairly slow when executed in rapid sequence for a long time (the scraper runs...

Is there such a thing as a converter from php to html?

Don't think that I'm mad, I understand how php works! That being said. I develop personal website and I usually take advantage of php to avoid repetion during the development phase nothing truly dynamic, only includes for the menus, a couple of foreach and the likes. When the development phase ends I need to give the website in html fi...

php error with post inside variable

Trying to do this: $product_description = 'Credit balance of €' $_POST['creditamount'] ; Want to display that post inside my variable but get this Parse error: syntax error, unexpected T_VARIABLE in /var/www/account/credits/moneybookers/process.php on line 48 What am i doing wrong?? ...

Is it possible to run XMPP based PHP and Javascript Multiplayer Network Game in FaceBook?

Hi, let me introduce my story first. To develop a multiplayer network game in facebook, flash used to be a king but it consumes a lot of resources for client and I feel like it isn't worth for a card game. So I come with an idea that front-end will use Javascript (of course with jQuery) and backend with PHP. But for real-time communicati...

Using the filename for GET data and making the PHP page output as a JPG extension?

Alright, currently I'm using GD to create a PNG image that logs a few different things, depending on the GET data, for example: http://example.com/file.php?do=this will log one thing while http://example.com/file.php?do=that will log another thing. However, I'd like to do it without GET data, so instead http://example.com/dothis.php wil...

PHP Detect if any URL variables have been set

Hey guys, it's kind of hard to explain but basically I want to detect if any variables have been set through the URL. So with my IF statement all of the following should return true: http://domain.com/index.php?m=100 http://domain.com/index.php?q=harhar http://domain.com/index.php?variable=poo&crazy=yes and all the following r...

php access array value from function return

silly php question... why cant i do this? echo Auth::getFullUser()[ 'country' ]; instead you have to do this $user = Auth::getFullUser(); echo $user[ 'country' ]; ...

What could cause a PHP error on an include statement?

Ok, this was a stupid mistake. Had nothing to do with permissions or anything else I thought it might be. It was a simple syntax error in a file I didn't even think was being loaded. Reminds me of a quote from the first computer science teacher I ever had: "If you are certain that all of your code is correct, and the program doesn't ...

How to mass-fetch pages from a website behind authentication in PHP

Yes, yes, i know user and password. I need some trick in php to get logged into a website and retrieve some images/contents, like a normal website. Obviously with a curl o file_get_contents it doesn't work because i'm not authenticated. How i can do? The authentication is normal HTTP auth with POST. Edit: ok thanks for help it works...

Empty POST from jQuery UI Dialog to PHP function with $.post

Hello, I am having hell of a time trying to figure this one out. Maybe someone can help me here or point me in the right direction. I have a jQuery UI dialog that pops up when user clicks on an image. The dialog displays a form with 2 drop down windows. "dept" and "group". Group drop down is disabled, until something is selected in the...

Php efficiency question --> Database call vs. File Write vs. Calling C++ executable

Hi, What I wish to achieve is - log all information about each and every visit to every page ofmy website (like ip address, browser, referring page, etc). Now this is easy to do. What I am interested is doing this in a way so as to cause minimum overhead (runtime) in the php scripts. What is the best approach for this efficiency-wise:...