I have a REST API written in PHP located on Apache server. It takes as a parameter a file (15KB). When I call this API from J2ME application it does work fine. Moreover when I wrote a API client in C# it worked too fine.
But now I have this second server with Lighttpd. I copied my API to this server and called it from C# app and it wor...
I want to redirect users that arrive at my root url to another page that contains the referring site in the url, so that I can track which sources provide the most sales.
So if a user arrives at mysite.com from google, they will be redirected (using php header function) to mysite.com/page.php?ref=google.com. That way, I can see in my re...
Is there a standard third-party module that everyone/anyone is using for programming batch order imports in Magento? I need to do a complicated history import for a client, and the SOAP API doesn't have an order creation API, and an Order model existing in the system is dependent on so many other things already existing that it's not a...
PHP lacks any specific function to fsync on a file AFAIK. I do however feel the urge to fsync a logfile I am appending to from PHP.
Is there any native PHP function known to cause an fsync? Or any workaround?
...
Hi, this works for me, but is there a better/safer way to use an include:
<?php include "http://www.myserver.com/somefile.php" ; ?>
I tried:
<?php include "somefile.php" ; ?>
but it did not work.
...
Hey,
I am looking to produce a function where I check the date is in the last fortnight.
This is something I have never done before.
I have produced a mysql_query
$q = "SELECT date_subbmited FROM ".TBL_CONF_RESULTS." WHERE home_user = '$u' OR away_user = '$u'";
That would select the date and in PHP i could check whether it was in th...
I need to somehow take a unix timestamp and output it like below
Can this be done with MySQL? Or php
Mike 7s ago
Jim 44s ago
John 59s ago
Amanda 1m ago
Ryan 1m ago
Sarah 1...
I'm trying to run one SQL command to update multiple databases. If I copy 'n paste sql code below directly into PHPMYADMIN it executes just fine, but when I run the sql through php it doesn't update?
If I run the updates for each database separately via my php script they both update fine, so I'm confused?
What am I doing wrong?
SQ...
Hey Everyone,
I have a question revolving around the idea of customized or personalized products. I have been researching the heck out of the existing cart solutions, both open source and paid looking for a solution. I'm not a developer myself, but I do have some technical knowledge and developers on staff.
Here's my question.
I hav...
From an external source I'm getting strings like
array(1,2,3)
but also a larger arrays like
array("a", "b", "c", array("1", "2", array("A", "B")), array("3", "4"), "d")
I need them to be an actual array in php. I know I could use eval but since it are untrusted sources I'd rather not do that. I also have no control of the external...
I didn't notice exactly when, but during a coding session today, an error appeared:
Not Found
The requested URL /index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This is displayed whenever I submit a form. The form is processed app...
This is probably pretty simple but I am new to this.
All I want to do is put some of the current links I have working inside a dropdown menu.
Here are the working links I would like to display in a dropdown:
<p>
<?=anchor('tasks/AddTask', 'Add a Task')?>
<?=anchor('tasks', 'All Tasks')?>
<?=anchor('tasks/mjh', 'Mike')?>
<?=anchor('tas...
Hi ,
How can I create graphs like this..
<?= format_size($this->space_used); ?> out of <?= format_size($this->total_space); ?>
...
I am working on a website which already has user access set up so that only members who are logged in can see certain pages. Now i need to go in and make the access for logged in users more specific. So, anyone who logs in can see the site, but there are 2 pages (called PDQ and Comm Plus) that should only be accessed by users that have P...
strtotime("25/03/1957") returns false. what will satisfy all of these date formats? i can't imagine how long it would take to actually make my own, so i hope there's already one out there you know of.
thanks!
...
I have a calendar application, and in that calendar application, there is a "mini view" of a calendar. That little widget only displays the days of the currently chosen month and when you click the number it opens a new page and sends GET data to that new page (to display MySQL info, etc.)
The point is: this little mini-calendar doesn'...
I am trying to loop through an array of usernames and for each username, execute a mysql_query on each.
<?php
for ($i = 0; $i < count($u); $i++)
{
$j = $i + 1;
$s = $database->checkUserPlayedRecent($u);
if (mysql_num_rows($s)...
I am trying to update a password into two different models/tables in CakePHP. I can update it fine in the parent model, but not the second model.
Models:
Users (hasOne GameProfile) PK=id
Gameprofiles (belongsTo User) FK=user_id
Here is a stripped down version of my function in the Users_controller.php:
function updatepass() {
if (!...
I would like to create a custom class that will generate an HTML email. I want the content of the email to come from an "email view scripts" directory. So the concept will be that I can create an HTML email view script the same way I would create a normal view script (being able to specify class variables, etc), and the view script would...
I am trying to use WSO2' WSF for PHP and I am using a WS Security object. I am making the request to the server and getting an Authentication error. I believe the WS Security Object is missing something, so I would like to see the RAW SOAP message being sent...Is there a way to do this.
I am not doing this locally.
...