I am trying to upload image from android phone to php server with additional values,the method is post
my php file look like this
if($_POST['val1']){
if($_POST['val2']){
if($_FILE['image']){
......
}
}
}else{
echo "Value not found";
}
I am doing is
URL url=new URL("http://www/......../myfile.php");
HttpURLConnection…
I am developing a non-real time browser RPG game (think Kingdom of Loathing) which would be played from within a Flash app. At first I just wanted to make the communication with server using simply URLLoader to tell PHP what I am doing, and using $_SESSION to store data needed in-between request.
I wonder if it wouldn't be better to base…
Am I using TwitterScript to retrieve Twitter data for inside a Flash site. Due to Twitter's crossdomain policy, I need to setup a php proxy...
Firstly I made a simple one
<?php
$url = $_GET['url'];
readfile($url);
?>
but I then get this error
URL file-access is disabled in the server configuration
which is only resolved by…
It seems like I've been plagued with memory usage issues most of the time I've been blogging (7 years). I upgraded my hosting to a HostGator VPS and still seem to have issues.
I have about a dozen WP 3.4.2 sites running within a single account. Each has a separate installation.
I finally installed TPC! Memory Usage within one of my…
Hi all and thanks in advance to all for this
I tired and was unable to find the answer i am looking for an answer. my problem is that i am unable to update the values enterd in the form. I have attached all the files i'm using MYSQL database to fetch data.
what happens is that i'm able to add and delete records from form using ajax…
In my framework, I make a number of calls to session_write_close().
Let's assume that a session has been initiated with a user agent. The following code...
foreach($i = 0; $i < 3; $i++) {
session_start();
session_write_close();
}
...will send the following request header to the browser:
Set-Cookie …
so i have been looking around on how to do this but with no success.
Im trying to get the value of the name test from an external website
<input type="hidden" name="test" value="ThisIsAValue" />
But so far i have only found how to get the value of that with an ID
<input type="hidden" id="test"…
ok i have a main document that displays a chatbox, what i want is for the chatbox to refreash on everyone who is logged in's screen whenever someone posts a new message...
ive tried many methods including sleep timers and new functions that call then sleep and get recalled but this just generates an…
I want to upload a picture from another site to my FTP server using PHP.
Example:
File to upload("http://page.mi.fu-berlin.de/krudolph/stuff/stackoverflow.png")
FTP-path("pictures/")
This is what I've already tried:
1
$image = file_get_contents("http://img.youtube.com/vi/Rz8KW4Tveps/1.jpg");…
Its been a while since I updated my pagination on my web page and I'm trying to add First and Last Links to my pagination as well as the ... when the search results are to long. For example I'm trying to achieve the following in the example below. Can some one help me fix my code so I can update…
I'm starting a project on web monitoring where other websites can be monitored.
Recently, I have found codeIgniter, yii, kohana frameworks online, but I'm confused as to whether to choose any of those or start directly.
Moreover, this is my first big project that I'm planning for. So can…
Hi, I have a problem with php header redirect. I already spent hours trying to fix it.
The problem doesn't occur when the bit.ly api is not used in the script, I have no clue why.
<?php
if (strlen($_GET['url']) > 26) {
$shortenedURL = $_GET['url'];
if…
I have written a send sms code which uses an available sms api. So, I need to post a string in the json(string in $json) format to a url(url specified in $url var), but I am getting the following error
String index out of range: -1
I understand that the error arises when…
Background Information
I have a web app that allows end users to connect to ssh-enabled devices and manipulate them. Right now, i only support one version of firmware.
The logic is something like this:
user clicks on a button to run some command on device.
web…
I am using in_array, and I'm trying to use it in a way where it will only return true if it's an exact match of one of the objects in the array, not just if it's "in" the array.
e.g.
1. $sample_array = array('123', '234', '345');
2. $sample_array = array('23',…
I would like to assign a static function to a variable so that I can send it around as a parameter. For example:
class Foo{
private static function privateStaticFunction($arg1,$arg2){
//compute stuff on the args
}
public static…
I have a php file with around 100mb which is full of arrays (only arrays).
I've made a script that includes this file (for processing), first it exhausted the default Xampp 128mb memory limit, i've raised it to 1024mb but it just takes forever and doesn't…
hi , in code there Warning
Warning: mysql_fetch_array() expects
parameter 1 to be resource, string
given in
C:\xampp\htdocs\Join.php on
line 69
but i can not solving where exactly
can you help me where the error in this code .
<?php
…
I have run into a very interesting problem trying to debug my custom php session handler. For some reason unknown to me I can set cookies all the way through the session handler right up until the very start of the write function.
As far as I know session…
I've been doing a lot of ajax calls and using the returned data to build html with javascript. However, I've noticed some people are returning the constructed html in the ajax calls since they're doing it all in php.
What is the preferred method? I have a…
So, I have 5-6 pages of requirements. I'm trying to build this application in PHP based on the requirements.
I want to transfer files from one server to the other server in LAN, and then send a shell command to the other server to find out if the file has…
Hi there,
I have manage to grab all the photos posted to my app wall.
Now I am trying to add a function to my facebook app where it will delete all the feeds posted on the wall.
<?php
include_once 'facebook.php';
include_once 'config.php';
$feed =…
I'm using PHP for a file download page. Here's a snippet of the problem code:
if (file_exists($attachment_location)) {
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
header("Cache-Control: public"); // needed for i.e.
header("Content-Type:…
I saw that one of the interview questions could be building a pascal triangle.
Is there anything wrong with this particular solution I came up with?
function pascal_r($r){
$local = array();
if($r == 1){
return array(array(1));
} else {…