Task
Downloading binary files from a remote media processing server to a web server.
This works but I cannot capture the curl stdout output
$result = shell_exec('curl -v http://domain.com/images/dir/dir/dir/file.jpg --user username:password -o /usr/www/htdocs/images/dir/dir/dir/file.jpg');
Note:
I have had no luck using the PHP cu...
<?php
if (isset($_GET['flyerID']))
$FlyerID = $_GET['flyerID'];
$DBConnect = @mysqli_connect("host", "UN", "pword")
Or die("<p>Unable to connect to the datbase server.</p>" . "<p>Error Code ".mysqli_connect_errno().": ".mysqli_connect_error()) . "</p>";
$DBName = "agentsleuthdb";
@mysqli_select_db($DBConnect, $DBName)
O...
Hello,
i think this question is very easy but I don't know if i am right.
I am an oldschoool html, php coder.
I want to use this kind of navigation:
http://www.cssportal.com/horizontal-menus/13styles.htm
So far no problem. I got an dynamic php page and i want to use this Menu.
There is no problem without this line in the HTML Part:
...
isnt it better to use jquery for form submit?
like:
Username:
<input type="text" id="username" name="username" maxlength="30" /><br />
Password:
<input type="password" id="password" name="password" maxlength="30" /><br />
<input type="button" id="register" name="register" value="Register" />
and then bind the id...
I have the following query, (which don't work).
How do I bid strings inside an existing string with % (I believe the % is not the problem, but really not sure).
$sql="SELECT * FROM T WHERE f LIKE '%:bindParamString%'";
...
My current implementation, which is array based stores keys and values in a dictionary, example:
$arr = array(
'message' => 'Paste a <a href="http://flickr.com/">flickr</a> URL below.',
);
I realize that it was probably a bad idea storing html inside of a string such as this, but if I'm using gettext then in my .mo/.po fi...
Hi is possible automatically to format (using date()) all data from a datetime field in CakePHP?
I'm thinking about using a callback function in the model but I don't know if I could filter fields coming from a datetime type.
Thanks in advance!
...
Hi all,
I've got a LAMP site with a form that a user fills out. For some reason if viewing the returned form submission data on IE 7, it's inserting line breaks between each word. It's a pretty basic form with some input elements and a text area. If I submit the form with FF3+, IE8, or safari this isn't happening and everything looks f...
I know I can use number_format, but is there a way to represent base32 numbers? For example, hex can be represented with 0x... and octal can be represented with a 0 in the front. Is there anything to represent base32 numbers in php?
...
Okay, I have this script that should display the tags that are entered more times bigger and tags that are entered less smaller for a certain question. But for some reason it displays the last tag entered bigger and displays all the tags that where entered before it smaller like if it was counting down. I need to fix this problem.
I hop...
I'm wondering if anyone familiar with AMFPHP or low level data storage could explain why integers are being stored as two bytes instead of four. As far as I can tell, the AMF3 protocol demands a four byte integer. The specific code in the serializer is the following:
/**
* writeInt takes an int and writes it as 2 bytes to the output ...
Is there a way to tell how much total memory MySQL used to construct a result set from a single query? What I'm looking for is something similar to php's memory_get_peak_usage().
I have a complex query that produces a few rows of summed data. The actual result set is tiny -- 6 or 8 rows of a floating decimal value. But the query I use ...
Hello, I really can't find the error. Here is my code:
<?
// Action: add news
if( array_key_exists('create_new', @$_POST) )
{
?>
...
<?
exit();
}
?>
Before this my problem was in construction: <?=...;?> My apache doesn't understand it so that I rewrited code without that. But now I really can't find solution.
...
How can I create a (empty) XML file trough a existing XSD schema?
Which PHP (5.3) functions are necessary?
...
I'm using the following command to execute a PHP file via cron
php -q /home/seilings/public_html/dvd/cron/mailer.php
The problem is that I Have a file that's included in the execution that determines which config to load.... such as the following:
if (!strstr(getenv('HTTP_HOST'), ".com")) {
$config["mode"] = "local";
} else {
...
im new in formavalidation.
i am wondering if there is some library class you can download and include and then use for formvalidation in php and also in javascript/jquery?
it would save a lot of time so you dont have to reinvent the wheel.
thanks a lot in advance!
...
Note: I'm sorry if this is an extremely simple question but I'm somewhat obsessive compulsive over the formatting of my code.
I have a class that has a function that returns a string that will make up the body text of an email. I want this text formatted so it looks right in the email, but also so it doesn't make my code look funky. Her...
Hi all, I'm having a problem with this function. It's supposed to echo out some stuff, but for some reason it won't do so when I call it.
Here's the function:
$count = count($info['level']);
function displayInfo()
{
for ($i=0; $i<$count; $i++)
{
echo "[b]".$info['name'][$i]."[/b]\n\n"
."Level: ".$info['level'][$i]
."\nP...
I'm creating a web application that will involve habitual file uploading and retrieval (PDFs, Word Documents, etc).
Here are the requirements:
need to be able to link to them in my view script so a user can download the files.
files should not be accessible to users who are not logged in.
Question #1: Where should I store these file...
I'm working on creating a membership-based web application. In order to become a member, you must fill out a lengthy membership application that qualifies your business. Once the application is complete, it goes to the admin of the site for approval. The application contains about 60 or so questions to be answered. Perhaps 25% of those q...