Hi,
I am trying to write a web scraper using simplehtmldom. I want to get a tag by searching the contents of the tag. This is the plaintext inside it, not the type of tag. Then once I have the tag by searching for the contents of its plain text I want to get the next tag after that.
How do I find a tag based on its contents? And on...
I am trying to the implode the userIDs in the $users_in_range array the problem is it is iploding miles instead of userid
<?PHP
$users_in_range = users_in_range($lat, $long, 500, true);
// implode users into mysql friendly list
$comma_separated = implode(",", $users_in_range);
echo $comma_separated;
// this is just for output while...
Hello,
My question is:
Can I still do query's from within an object like this:
$result = mysql_query ($q,$dbc)
or
trigger_error("Query: $q\n<br />MySQL Fout: " . mysql_error($dbc));
by passing the global dbconnection variable $dbc to the constructor
or is there a better way?
Or creating a singleton class for...
I am implementing a notification system and seeing if these suggestions are valid to set up, if one is better than the other or a better solution is available:
A notification is added to the database. A guest / identifiable user logs onto or uses the site. They are greeted with notifications they haven't seen before with the option to c...
$data contains tabs, leading spaces and multiple spaces, i wish to replace all tabs with a space. multiple spaces with one single space, and remove leading spaces.
in fact somthing that would turn
Input data:
[ asdf asdf asdf asdf ]
Into output data:
[asdf asdf asdf asdf]
How do i do this?
...
Here is my problem, i have a class with a ave method, i want to pass a Mysql DB link to it, so i create a new object from the class, and call the saveProperty method, and in my main file i created a MySQL connection and saved the link in a var called $db so when i call the method it's link this: saveProperty($db).
but insted of saving t...
i want a PHP script which can convert .po(Portable Object) as .mo(Machine Object) file?
is any script available in PHP?
byte
+------------------------------------------+
0 | magic number = 0x950412de |
| |
4 | file f...
Suppose I have an array in PHP that looks like this
array
(
array(0)
(
array(0)
(
.
.
.
)
.
.
array(10)
(
..
)
)
.
.
.
array(n)
(
array(0)
(
)
)
)
And I need all the leaf elements of this mulit-di...
Need to display data from database in different textbox of each value of one row. when i click the next button then show the next row's value in that textbox and when i click the previous button then show the previous row's value.
All code must be in php.
...
I am programmer with a games and 3D graphics background and at the moment I would like to brush up on my networking and web development skills.
I have a task that I would like to accomplish to do this. My idea is that I would like to be able to send a HTTP request or something similar to my webserver, which runs a LAMP based setup. I wo...
I have this code:
//fetch data
$data = $_POST['list'];
echo($data);
echo('<br>then<br>');
$data = str_replace("\t", " ", $data);
echo($data);
$matches = array();
$user = array();
preg_match( "/(.+?) ((?:[A-Z])(?:[0-9]+:){3}[0-9]+) ([0-9]+) \/([0-9]+) ([0-9]+) \/ ([0-9]+)/", $data, $matches );
list(,$user['base'],$user['location'...
i am using this query
select date_time_posting from table where FROM_UNIXTIME(date_time_posting,'%d-%m-%Y')='$c_day_date'
where $c_day_date is having dates in dd-mm-yy format like 25-07-2009
My server is in different time zone from mine.Total difference is of about 6 hours i.e. my local timezone is 6 hours ahead of my server timezone....
I'm looking for a tutorial for updating Facebook status in PHP. Any suggestions?
...
I've been testing the Doctrine migrations in symfony and I finally got them to work, but I noticed that these migrations only update the database. The forms and the model are not updated as I expected...
Is this normal? If it's normal, is there a way to update the model with the changes made to the db?
...
I want to make a video site in which we can upload the video in any format and display it like youtube. How can I do this? My whole site is in PHP I'm a newbie in the video streaming sp plz be descriptive with your answer
Thanks
...
Hi,
is there an easy way to count uppercase words within a string?
...
Hi all,
my array is setup as follow:
array
'testuri/abc' =>
array
'label' => string 'abc' (length=3)
'weight' => float 5
'testuri/abd' =>
array
'label' => string 'abd' (length=3)
'weight' => float 2
'testuri/dess' =>
array
'label' => string 'dess' (length=4)
'weight' => float 2
...
Possible Duplicate
What's a good templating system for PHP?
What is your favorite PHP templating engine? There are a few frameworks, such as Symfony, that comes with its own templating engine, but there is also some other third party templating engines available, such as smarty.
Which is your favorite?
...
I have some HTML/CSS/JavaScript with painfully long class, id, variable and function names and other, combined strings that get used over and over. I could probably rename or restructure a few of them and cut the text in half.
So I'm looking for a simple algorithm that reports on the longest repeated strings in text. Ideally, it would r...
Currently my database user and its password are pretty easily to guess, eg.
database user: dbadmin
database pwd : super + companyname
What and how to generate a secure a secure database password? Using md5 or sha1??
What are the things that I need to pay attention to secure my database?
I am using php, thanks
...