blazing_bruce
-
Posts
28 -
Joined
-
Last visited
Never
Posts posted by blazing_bruce
-
-
Hi.,
I am really glad to introduce my new hosting comparison & hosting search engine http://servergrabber.com to PHPFreaks Community. I am eagerly waiting for your reviews.
-
Give url + try to use CDN if needed or move to cloud if it is related to "huge traffic". But before that, Give us an url
-
footer area's contact us & other 2 links are not working.. Write something related to your website on <title>Tag it helps for SEO.
-
The very idea of a site having that many h1s is hilarious (and bad SEO form at the same time). What do you intend to do with the nth occurrence?
Do you need just what <h1> holds? Or do you need the entire <h1> code? Lack of specifics means questioning what to capture (if there is a need to capture in the first place).
Well yes too much <h1> is not a good. I am just trying to get contents inbetween tags.. I tried the following for <td> </td> .
preg_match_all('/<td [^>]*>((?:<td.+?<\/td|.)*?)<\/td>/si', $sometable, $matches);
It worked like charm
-
Hello,
I am learning regularexperssion. it is pretty awesome.
Is it possible to make a pattern in preg_match_all to grab content of 6th or 7th h1 tag's text
<h1 styles.. or any other attributes *>text</h1>
<h1 styles.. or any other attributes *>text</h1>
<h1 styles.. or any other attributes *>text</h1>
<h1 styles.. or any other attributes *>text</h1>
<h1 styles.. or any other attributes *>text</h1>
The main objective here is.. I am trying to find a text of Nth occurance of <h1 and </h1>
I was trying to use preg_match_all .. But unable to get it. Any help would be much appreciated . Im sorry if it is a silly question
-
i writtened an algorithm for it myself :)
$checked[0] = 1;
$checked[1] = 3;
$checked[2] = 4;
$checked[3] = 6;
$checked[4] = 7;
if you want to get all posiblities of array elements (with out repeating)
like this
0 1 2 4
0 1 2 3
0 1 3 4
0 2 3 4
1 2 3 4
PHP code follows
[code]for($n=0;$n<=$total_checked;$n++)
{
unset($new);
$j=0;
//echo("N=$n<br>");
$value = $total_checked-$n;
//echo("value = $value<br>");
for($b=0;$b<$total_checked;$b++)
{
if($b==$value)
{
// echo("Entered condition");
$notaccepted = $checked[$b];
continue;
}
$new[$j]=$checked[$b];
echo($j);
//Change here if you want that combination of array values echo("$new[$j]");
$j++;
}
if($n==0)
{
continue;
}
// print_r($new);
echo("<BR>");
} [/code]
Thank you,
Karthi keyan -
if you know the outline of an algorithm, then you are welcome. please help me.
-
Hello all,
i have an array named $checked;
$checked[0] = 1;
$checked[1] = 3;
$checked[2] = 4;
$checked[3] = 6;
$checked[4] = 7;
i want to make combinations like
array index
0 1 2 3 means $checked[0]; $checked[1]; $checked[2]; $checked[3];
0 1 2 4
0 1 3 4
0 2 3 4
1 2 3 4
. . . .
like this manner. it should find all the possible combinations.
here i said the sizeof array is five. but it may be 7 , 8 or 3 . if the size of array is 'n' then i want combinations in size of 'n-1' .
is it possible? please help me.
Thank you,
-
Thank you Mr.Barand. your query is working now.
-
hello all,
i have a table named rest
RID CID
1 | 2
1 | 3
1 | 4
2 | 2
2 | 3
3 | 2
3 | 4
4 | 2
4 | 3
i want to list records which accepts the cards (CID).
first i have 4 check boxes in search.php
for($i=1;$i<=$total_cards;$i++)
{
$fetch = mysql_fetch_row($pass_cards);
$id=$fetch[0];
$name = $fetch[1];
echo("<input type='checkbox' name='card[]' value='$id' />$name");
}
in list.php
i want to show the list of records based on check box's value
getting post values by
$checked = $HTTP_POST_VARS['card'];
now i want to list all the records which having all the CID values.
if i checking the check box 2 and 3 (which is CID)
then list.php will show 1,2,4 (RID)
i have tried in many ways, but no use.
this is wil be a simple MySQL query. please help me.
-
hello,
now we are using $_POST['id']; like this .
i want to use $_POST['$id']; help me.
i want to place a php variable inside of $_POST[] please help me.
Thank you,
Karthi keyan. -
first try to check is it set on your system. try to use if(isset($_COOKIE['policyusername'])) or empty($_COOKIE['policyusername']) . try to check with junk data it is $username = "try this data"; and setcookie(policyusername, $username);
and then chck it. if it shows "try this data" in browser then there is a problem in query or empty data returend by mysql.
Try all the things i told
Thank you,
Karthikeyan. -
i think cookies are not setting in your pc. make sure that your browser allows to set cookies
Thank you,
Karthi keyan. -
[!--quoteo(post=356919:date=Mar 21 2006, 05:39 PM:name=gk20)--][div class=\'quotetop\']QUOTE(gk20 @ Mar 21 2006, 05:39 PM) [snapback]356919[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I have a table called item with fields category and item. I can display all distinct categories but I want to display them as links on my home page, so that when u click a category it displays all items in that category on a new page?
Here my code for displaying each individual category:
<?php
include 'db.inc.php';
$cats = @mysql_query("SELECT DISTINCT category from item ORDER BY category");
echo '<b>  Category List<br></b>';
while ($row = mysql_fetch_array($cats))
{
echo '<font color=red size="4">';
echo ' ';
echo $row['category'] . '<br/>';
echo '</font>';
}
?>
Can anyone help?
[/quote]
if you are trying to link them then
add two more echos inside of the while
that is
while ($row = mysql_fetch_array($cats))
{
//like file is
$link = "$row['category'] "."php"
echo '<font color=red size="4">';
echo ' ';
echo '<a href='$link'>';
echo $row['category'] . '<br/>';
echo '</a>';
echo '</font>';
}
i hope this will work as per your needs.
Thank you,
Karthikeyan -
hello,
Not just You are logged in as <?php $_COOKIE["policyusername"] ?>. it will be You are logged in as <?php echo $_COOKIE["policyusername"] ?>.
[a href=\"http://in2.php.net/manual/en/function.setcookie.php\" target=\"_blank\"]http://in2.php.net/manual/en/function.setcookie.php[/a]
Thank you,
Karthikeyan -
will you please show that db connectivity codes? like mysql_connect and are you sure that the port(which is used by mysql )is opened. show your code here plz.
Thank you
Karthi keyan -
Hello,
i fixed this problem now. by embedding simple java script lines. like
?>
<script language="javascript" type="text/javascript">
<!--
Newsite= window.open("<?php echo("$rediurl"); ?>","newsite");
// -->
</script>
<?
Thank you friends and PHP Freaks.
Thank you,
Karthi keyan. -
hello,
The error Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket filename or TCP/IP port number when trying to connect to the server.
for more reference about these type of probs [a href=\"http://www.oscommerce.info/kb/osCommerce/General_Information/Common_Problems/69\" target=\"_blank\"]http://www.oscommerce.info/kb/osCommerce/G...mon_Problems/69[/a]
Thank you,
Karthi keyan.
-
Great Prismatic,
Thanks :)
Really it is redirecting me. but one problem. i am using that redirecting line inside <iframe> tag so redirect url's content is showing inside of that iframe. if you are not clear with me then have a look at [a href=\"http://karthi.livesoft.info\" target=\"_blank\"]http://karthi.livesoft.info[/a] i want to load redirection page fully in browser atleast open in new window.
Please help me,
Thank you,
Karthi keyan. -
hello,
mysql_pconnect(); function for connecting mysql server. if you are using a simple database on your website then use mysql_connect(); it is enough.
Thank you,
Karthi keyan. -
then how can i redirect to $rediurl? i want to redirect by based on some conditons.
Please help me.
Thank you,
Karthi keyan. -
hello,
i am using a script named work.php for two purpose .
1. displaying banner image
2. checking remote address and putting clicks and hits informations in tables
2.1 after making these data base operations, redirecting browser to the $rediurl by using header();
$rediurl = // my url
header("Location:$rediurl");
i spliting my script by two separate if conditions.
1st condition for displaying image by
echo("<center><a href=\"$hrf\"><img src=\"$banurl\"> <br> </a></center>");
in second condition i am checking ip and date values, after that trying to redirect.
by:
mysql_close($connection);
echo("until db Close "); // this is for debugging process
header("Location: $rediurl");
i can get dbclose acknowledgement too. the header line didn't executed.
Pleaese help me. -
[!--quoteo(post=356294:date=Mar 19 2006, 06:01 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Mar 19 2006, 06:01 AM) [snapback]356294[/snapback][/div][div class=\'quotemain\'][!--quotec--]
echo("<center><a [!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]herf[!--colorc--][/span][!--/colorc--]=\"$hrf\"><img src=\"$banurl\"> <br> </a></center>");
try "HREF" or "href" instead of "herf"
[/quote]
Ohh what a minor mistake i did :( . Thanks a lot Mr.Barand. -
I am doing a banner exchange script.
this is the banner tag
"<!-- Banner code begin -->
<CENTER>'<IFRAME SRC= 'http://domainname.com/subfolder/work.php?ID=$check' width=300 height=400 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling='no'></IFRAME><p> </p></CENTER>
<!-- Banner code end -->";
inside work.php
$hrf = "http://domainname.com/subfolder/work.php?who=$check&redi=$rediurl";
echo("<center><a herf=\"$hrf\"><img src=\"$banurl\"> <br> </a></center>");
image was perfectly displayed. but i cannt make a link. please help me.
Thankyou,
Karthikeyan.
Hosting Comparison Engine Review
in Website Critique
Posted
@ProjectFear,
I really thank you for your time & kind advices to improve my site.
I have fixed that white popup on shared hosting listing pages. The price slider is being fixed.
Again, Thanks a lot. Thank you my friend