I'm using CURL to fetch some data from user accounts.
First it logs in and then redirect to another URL where the data resides.
My stats showed that it took an average of 14 seconds to fetch some data spread over 5 pages.
I would like to speed things up, my questions are:
Is it possible to see how much each step takes?
Do you know how ...
How do I create a user welcome message in php. So that the user who has been logged on will be able to see his username.
I have this code, but it doesn't seem to work.
<?php
$con = mysql_connect("localhost","root","nitoryolai123$%^");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("school", $co...
So I can call a php page using jquery
$.ajax({ type: "GET",
url: "refresh_news_image.php",
data: "name=" + name,
success: function(html) {
alert(html)
$('div.imageHolder').html(html);
}
});
However this getting a bit messy, I have a few .php files that only really preform very simple tas...
What im trying to do:
Fetch X numbers of RSS Feeds from my Blogs and echo only new entries. My Problem is, how to know wich items are already parsed?
Solution so far:
Fetch the Feed every 5 hours, store all titles inside an Database table or flat file. Next run check if the title is already in database if not print it and save it insi...
I have code JAVA
byte abyte1[] = new byte[k];
But php not have byte type. Its possible to convert this line to php?
...
I have a page that is called with a url like
http://testserver/path/to/foo/bar/
but apache is serving the wrong file altogether.
/path/to/ is a real directory where all the code and .htaccess file is. foo/bar/ is supposed to redirect to foo_bar.php with a RewriteRule, but it never gets there. It's not a mod_rewrite issue as I have comme...
I want to know the ideal instance site for a portal, may it be a news portal or sports portal
and is there a better hosting solution than ec2 for such a site ?
...
Our business has a Facebook Fan Page. The fan page doesn't seem to generate any emails to us when updates are made to the page, whether someone adds a new status or someone comments on one of the statuses etc.
Currently, we are running a very crude script to grab the content of the page and then use regular expressions to get the infor...
The code chokes at fopen():
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
$fp = fopen("/path/to/file/some_file.txt","a") or die("can't open file");
fwrite($fp,"some text");
fclose($fp);
?>
And the resulting web page says:
"Warning: fopen(/path/to/file/some_file.txt) [function.fopen]: failed to open stream: Pe...
Hi,
implementing publishActivity in PHP using the REST API using this code:
$activity = array(
'message' => '{*actor*} did something.',
'action_link' => array(
'text' => 'Play Travians',
'href' => WEBROOT
)
);
$activity = $facebook->api_client->dashboard_publishActivity($activity);
I get a 15-digit number ...
I have some xml files that contain text, which are displayed on my website. I want to extract the text from these xml files and convert them to a pdf document that users can download.
how can I can extract this text from the xml documents? (libraries etc?)
how can I use this text to create a pdf document?
I am working in a PHP enviro...
$arr = array('superman','gossipgirl',...);
$text = 'arbitary stuff here...';
What I want to do is find the first/last occurencing index of each word in $arr within $text,how to do it efficiently in PHP?
...
How do many of the websites that have logins keep the username in the username field when the password is entered incorrectly.
The form's action (it is on index.php) is another php file, which if the password is incorrect uses Header() to go back to the index and passes the error to it using GET. I could use GET to pass the username back...
Hello I'm having problems sending arrays, structs and arrays of structs from PHP to an ASP.NET SOAP server...
Anyone have a sollution for this? I've googled for days and any sollution worked for me. Perphaps I'm forgetting something...
There are examples of my code:
$client = new SoapClient($options);
$pCriteria = new stdClass();
$pC...
how get UnsignedBytes in php? In java very easy: readUnsignedByte (Java)
...
i have a database patient with 3-4 tables n each table has about 8 attributes....
i have a table medical history which has attribute additional info ... under which i have 5 checkboxes....
all the values entered are taken up except the chekbox values.....
plz help
...
Is there a web site or tool that will convert a piece PHP code to C#?
something similar to
http://converter.telerik.com/
or
http://www.developerfusion.com/tools/convert/csharp-to-vb/
...
Is it possible to restrict direct access to PHP file if I use jquery .load function like this one:
$(document).ready(function(){
$("#second").load("testip.php");
});
In this case I want to restrict direct access to file testip.php that will instert data in database.
Can I do it using some PHP function that will compare visitors IP ad...
Hi all,
I'm working with PHP 5.3 on my local machine and needed to parse a UK date format (dd/mm/yyyy). I found that strtotime didn't work with that date format, so I used date_create_from_format instead - which works great.
Now, my problem is that my staging server is running PHP 5.2, and date_create_from_format doesn't work on that ...
Hi,
I'm using a MySQL database to store scores for my game. A very simplified version of the table would be
(PlayerID - int)
(Name - string)
(Score - int)
I'd like to form a query that would return me a set of say 10 results where the player of interest is in the middle of the table.
Perhaps an example would make it more clear.
I h...