Im currently working with an API which requires we send our collection details in xml to their server using a post request.
Nothing major there but its not working, so I want to output the sent xml to a txt file so I can look at actually whats being sent!!
Instead of posting to the API im posting to a document called target, but the x...
I am developing a tool where lots of data (>1MB of data) with lots of lines can be copied and pasted into a textarea. When I submit the form it just shows a blank screen. Nothing happens. Is there a way to process large data submitted by a form with PHP like in chunks and pieces? What are the best practices do handle large amount of data...
Hello, I'm looking for a way to pause or resume an upload process via C#'s WebClient.
pseudocode:
WebClient Client = new WebClient();
Client.UploadFileAsync(new Uri("http://mysite.com/receiver.php"), "POST", "C:\MyFile.jpg");
Maybe something like..
Client.Pause();
any idea?
...
Once i login, a new session is generated.... how can i later know for which login the session is generated.
I am getting the session value, but how to know for which user the session is all about and redirect him to that page.
...
Please look at the following code snipped
class A
{
function __get($name)
{
if ($name == 'service') {
return new Proxy($this);
}
}
function render()
{
echo 'Rendering A class : ' . $this->service->get('title');
}
protected function resourceFile()
{
return 'A.res';
}
}
class B extends A
{
pr...
Can anybody advise solution for implementing online high scores table for iPhone game ?
I mean simple engine to publish player result by http query and view global high scores table.
I'm weak in PHP so trying to find existing solution first.
Thanks.
...
I've been developing with PHP for some years now, and recently came across this code:
<?php
echo <<<EOB
<html>
<head>
<title>My title</title>
</head>
...
EOB;
?>
I've never seen this approach to print HTML, which seems to be pretty useful and less prone to some weird variable or double quote syntax error.
I've...
Is there any reasons why PHP's json_encode function does not escape all JSON control characters in a string?
For example let's take a string which spans two rows and has control characters (\r \n " / \) in it:
<?php
$s = <<<END
First row.
Second row w/ "double quotes" and backslash: \.
END;
$s = json_encode($s);
echo $s;
// Will outpu...
I have a Flash developer I'm working with. This person is building a tool in AS2 that will provide an interface that will send voting data (firstname, lastname, email address, votes (there are 100 items in categories and users will be able to choose some subset to declare "best").
All fair enough, Flash dev will POST data to a PHP app I...
Hi,
I have made a facebook application which retrieves users friend list.
Now i want to give the option of inviting friends through my application and the option of sharing reports between the invited friends through facebook api using php.
How can i achieve this?Please help.
...
I'm a beginner with PHP security issues. Someone reported a security issue with my code, but never gave details.
Below is a condensed version of the code. I'm using the JQuery AJAX function to send some data to the server where it's used by the PHP scandir() function.
Do you see any security issues?
HTML Document
<script
src="h...
First question, please be gentle ;-)
I've written an image class that makes simple things (rectangles, text) a bit easier, basically a bunch of wrapper methods for PHP's image functions.
What I'm trying to do now is to allow the user to define a selection, and have the following image operations only affect the selected area. I figured ...
I am creating a php backup script that will dump everything from a database and save it to a file. I have been successful in doing that but now I need to take hundreds of images in a directory and compress them into one simple .tar.gz file.
What is the best way to do this and how is it done? I have no idea where to start.
Thanks in ad...
Hello,
I have an file uploading site, it has an option of uploading through urls, what i am trying to do is whenever a user uploads through url, i check my database if a file exists that was uploaded through same url it displays the download url directly instead of uploading it again.
The data sent to uploading script is in array form ...
In addition to this question: iPhone network performance, I would like to know if there are any (very) good XML parsing frameworks out there for PHP.
PHP has great XML support already, but I wonder if it could be better (in terms of performance, memory usage, etc).
...
I'm making a little site for a friend, noobfriendly, so she can add pages easy.
I think I'm just gonna include everything in index.php. So she can just drop a page in a folder named /pages/ and it's done.
index.php
if (preg_match('/[a-zA-Z]/', $_GET['page'])){
$page = 'pages/'.$_GET['page'].'.php';
if ($page) {
include $page;
} else ...
is there a way to set *error_reporting(E_ALL);* for a specific directory rather than including it in each file?
I'd like to turn on error reporting for my beta.mysite.com
...
I've recently been working with a simple Twitter API for PHP and came across this code to make @username be linked with twitter.com/username. Unfortunately this code creates it so @username links to http://twitter.com/@username, resulting in error. There are many parts to this code I do not understand, such as ^\v and others (seen belo...
I'm trying to build a standard compliant website framework which serves XHTML 1.1 as application/xhtml+xml or HTML 4.01 as text/html depending on the browser support. Currently it just looks for "application/xhtml+xml" anywhere in the accept header, and uses that if it exists, but that's not flexible - text/html might have a higher score...
I want to center an image in an area, without resizing... I am using HTML.
Example:
I have an image <img src='img1.png' width='64' height='64'> - the image is actually 64x64. It displays perfectly.
Now, I have another image <img src='img2.png' width='64' height='64'> however, the image is not as big as it should be, its 32x32 - what ...