I am using a fairly straight-forward script to open and parse several xml files that are gzipped. I also need to do the same basic operation with a ZIP file. It seems like it should be simple, but I haven't been able to find what looked like equivalent code anywhere.
Here is the simple version of what I am already doing:
$import_file...
I'm building an air app (A screensaver). What I want to do is to let the app check a webservice (preferably PHP, java axis2 would also help) for images and text content etc. I may even do some DOM restructuring (using jQuery). Any suggestions and pointers would be welcome. Of Course code snippets would be appreciated :-)
thanx
Pk Anane
...
hi there
i am looking for a good way to automaticly create/update sitemp for my website www.indexagahi.com
its a free classified ads site , i want to rebuild or update sitemap.xml whenever an ads has been added .
whats your idea ? is it possible .
i appreciate any help.
thanks a lot.
...
Is this an okay practice or an acceptable way to use PHP's error suppressing?
if (isset($_REQUEST['id']) && $_REQUEST['id'] == 6) {
echo 'hi';
}
if (@$_REQUEST['id'] == 6) {
echo 'hi';
}
EDIT:
I thought so too. The code (and idea) is from friend.
Thanks for proving me right. :)
...
What is the php code to append class="external" to links that are posted and are not the domain.
For example my site is www.mysite.com and you post a link to www.mysite.com/news and a link to www.yoursite.com
How do I set it so only non "mysite.com" links have the class specified?
...
My wordpress*(a custom template)* nav is all working on all of the pages but now I found out that the Main nav doesn't show on this pages
All pages e.g. search.php, single.php, index.php, page.php all has <?php get_header(); ?>
I really don't know whats wrong.
Here is the code for my header.php
<?php
/**
* @package WordPress
*...
Hello. I am working on a PHP project. There, I often use following syntax to output text in a cluase:
if($boolean){
?>
output text
<?
}else{
?>
alternative
<?
}
On my computer, this works perfectly well. I use XAMPP foer Mac OS X. But when I send the files to my coworker, these outputs often do not work and the compiler complains ...
Hey Everyone,
Here is my current problem. I am working with the chat module and I'm building a module that notifies users via AJAX that they have been invited to a chat. The current table structure for the invites table looks like this:
|-------------------------------------------------------------------------|
| CCID | NID | INV...
I have an Object
(
[id] => 1
[parent_id] => 0
[result:Database:private] =>
[db:Database:private] => mysqli Object
(
[affected_rows] => 0
...
)
)
Obviously, the Object has inherited the 'db' and 'result' properties of the parent Database c...
<?php
// Execute a shell script
$dump = shell_exec('bigfile.sh'); // This script takes some 10s to complete execution
print_r($dump); // Dump log to screen
?>
When the script above is executed from the browser, it loads for 10s and the dumps the output of the script to the screen. This is, of course, normal. But if I want the dat...
I get the following error on line 8: Undefined index: privacy_policy which is $privacy_policy = mysqli_real_escape_string($mysqli, $_POST['privacy_policy']); I was wondering how can I fix this problem?
Here is line 8.
$privacy_policy = mysqli_real_escape_string($mysqli, $_POST['privacy_policy']);
Here is the PHP.
if (isset($_POST['s...
Conceptually speaking how would one go about writing an achievement system for a website using PHP and MySQL?
Is the only real way of doing it is to constantly do MySQL queries to test for achievements and such?
...
Hi,
I'm using PDO for connect to the database in a system where I want implement memcached.
I don't know what keys use for caching the results because I can't get the string of the final query with PDO (because the prepared statements).
Any good idea for resolve this?
Thanks in advance.
...
Hi,
I have a php script that runs a mysql query, then loops the result, and in that loop also runs several queries:
$sqlstr = "SELECT * FROM user_pred WHERE uprType != 2 AND uprTurn=$turn ORDER BY uprUserTeamIdFK";
$utmres = mysql_query($sqlstr) or trigger_error($termerror = __FILE__." - ".__LINE__.": ".mysql_error());
whil...
My PL/SQL procedure returns a cursor. It always returns data. I fetch (oci_fetch_assoc) it and save it in an array. If results were found the keys of the array will be strings. If the cursor didn't find data, it will return value 0, thus the key of the array will be numeric.
while($data = oci_fetch_assoc($cursor)){
if(!isset($data[...
It seems to not get past this step:
[ 16%] Building CXX object src/CMakeFiles/hphp_runtime_static.dir/lib/system/gen/sys/dynamic_table_func.no.cpp.o
UPDATE
The above was just slow. I left my desk and came back after several hours, and the build had completed successfully.
...
Hi all,
does anyone knows the alternative to the deprecated function session_is_registered in PHP5?
here's my code:
ob_start();
session_start();
if(!session_is_registered(myusername))
{
header("location:main_login.php");
}
ob_flush();
Thanks,
Mauro
...
This is a tricky one.
I am "emulating" ZF Bootstrapping (surface appearance). Don't ask me why, call it academic interest. So I have a Bootstrap Abstract with a method "run" that iterates over itself to locate any methods prefixed with "init".
The application looks for a user defined class which extends this class, in which the user ...
I have a web form that manipulates records in a MySQL database. I have a method for displaying an edit interface for both creating new records and editing them
if ($_POST['new_page']) {
print "<h2>Create new page</h2>\n";
$isNew=1;
$this->EditForm();
} else if($_POST['edit']){
print "<h2>Edit page</h2...
Hello,
I am trying to create my own torrent tracker but dont know how to generate info_hash that is used xbtt to track torrents.
Is this possible with php?
I am using this function to bencode and decode http://paste.lisp.org/display/17178
Is this the correct hash?
$nn = file_get_contents('my.torrent');
$file = bdecode($nn);
$hash = ...