CasTex -7 Light Poster

This script logins the facebook and gather some data (not important) from search, but however, its not working. Where is my mistake ? (Login is working, but gathering info from search results, isnt.)

<?

$first_name = 'Eda';
$login_email = 'bodrumlukardes@hotmail.com';
$login_pass = 'mypassword';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://login.facebook.com/login.php?m&amp;next=http%3A%2F%2Fm.facebook.com%2Fhome.php');
curl_setopt($ch, CURLOPT_POSTFIELDS,'email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&login=Login');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
curl_exec($ch);

curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_URL, 'http://www.facebook.com/search/?init=quick&q=bodrumlukardes%40hotmail.com');
$page = curl_exec($ch);

curl_setopt($ch, CURLOPT_POST, 1);

preg_match_all('#<td(.*?)</td>#si', $page, $aldim8);
echo $aldim8[1][0];


?>
CasTex -7 Light Poster

I want to echo the variable when I use test(); fuction. I meanwhen I use the variable with this function like test(john) , how to use it in that php snippet. Anyone knows ?

<script type="text/javascript">
function test(){
document.getElementById("php_code").innerHTML="
<?php echo "hello"; ?>
";
}
</script>
CasTex -7 Light Poster

Thanks but that is not working.

My problem is, I can't add new user if the new user's firstname (aut_username) was used before.

[IMG]http://img339.imageshack.us/img339/1360/asaaak.jpg[/IMG]

I can add new column for firstname, but could you please tell me how to make it that lets you add same entry names.

CasTex -7 Light Poster

Tried unticked, but same error again. I think, it is a varchar row, and you cant make it auto_inc , maybe you can add another row which is auto_inc. Somebody told me that;

You just need to Alter the table, add a new column (with a name such as 'id'), make it a primary key and make it auto-increment. This will create a primary key that is auto-incremented each time you add a new name, even if that name is the same as others.

What do you think ?

CasTex -7 Light Poster

I see the auto_increment and ticked that, but it gives this error now:

http://img25.imageshack.us/img25/5083/assswy.jpg

CasTex -7 Light Poster

Hello,

When I try to mysql insert values with same names, it encourages this error. When I looked at the table column, I see that the row id is always "1" and it doesnt let to add same entry.

http://img267.imageshack.us/img267/4123/sfff.jpg

My question is, how can I add an auto increment id to that column for adding same entry names?

CasTex -7 Light Poster

That works, but when you write another site and submit, its like

mysite.com/userssite1.com/userssite2.com/

:(

My page: http://www.downloadic.com/website-rank/index.php

CasTex -7 Light Poster

Thanks... I am sorry if I get you busy.

CasTex -7 Light Poster

Ok,

<form action="<? echo $_SERVER['PHP_SELF']; ?>" method="post" name="stats">
<TABLE border=0 bgcolor=#efefef align=center cellSpacing=0 cellPadding=0 border=0 width="750" bgcolor=#fbfbfd>
<TR height=50>
<TD align=right>
<input type=text name="site" value="www.">
</TD>
<TD valign=bottom>

<script type="text/javascript">
<!--
window.onload = function() {

var loc = location.replace( document.stats.site.value + '/' );

var content = "";
content += '<button id="btn" name="btn" onclick="';

   if ( window.status === loc ) {
   content += 'location =' + String( window.status + document.stats.site.value ) + ';">Search</button>';
   } else {
   content += 'location.replace(' + String( loc ) + ');\">Search</button>';
   window.status = loc;
   }
 document.write( content );
};
// -->
</script>

</td>
</tr>
</table>
</form>

The problem is, when I use the code, it directs a new page and only the button appears...

All I want is, if user write the site again, it shouldnt like mysite.com/userssite1.com/userssite2.com/

CasTex -7 Light Poster

Thank you, but when I put this, it still go a page that only the button appears :S

http://www.downloadic.com/website-rank/index.php (my page)

CasTex -7 Light Poster

Thanks but I don't understand what I should do.

I have a one text input, and the script you wrote. When user write site and submit, it should direct to mysite.com/userssite.com/ and if user write another site and submit again, it shouldn't be like mysite.com/userssite.com/userssite2.com/

So what should I put in the if statement instead of return false; ??

CasTex -7 Light Poster

Thanks, but, I tried that but the button doesnt appear on the page.... :S

CasTex -7 Light Poster

Try this one out:

<script type="text/javascript">
<!--

window.onload = function() {
   if ( window.status === "activated" ) {
   return false; 
   } window.status = "activated";
 var content = "";
   content += "<div>\n";
   content += '<button onclick="location.href = location.href.replace( document.stats.site.value, document.stats.site.value + \'/\' );"'; 
   content += ">Search</button>\n";
   content += "</div>\n";

   (( "writeln" in document ) ? document.writeln( content ) : document.write( content ) );
}
// -->
</script>

I replace with my old submit button, but when you open the page, it opens a page that only the button appears. Here is my page

http://www.downloadic.com/website-rank/index.php

CasTex -7 Light Poster

Nice detailed guide, thanks....

CasTex -7 Light Poster

Welcome dude ;)

tux4life commented: Shut up! -2
CasTex -7 Light Poster

Nice idea about quicklaunch, thanks...

CasTex -7 Light Poster

Reservation Date
Arrival Date
Departure Date
RoomCategoryID
Status
TotalCost

CasTex -7 Light Poster

Thanks, really like this ebook...

CasTex -7 Light Poster

Thanks!. I was lookin something like that...

CasTex -7 Light Poster

it has nothing to do with JSP either (and anyone doing something like this in a JSP should be shot, preferably in the gut, and left for the vultures).

You are totally right...

peter_budo commented: Pointless bump into old post with zero value comment -4
javaAddict commented: For posting at an old solved thread for no valid reason -1
CasTex -7 Light Poster

I will try this thanks a lot mate...

@Nish123,

I use it beacuse if user write site.com

mysite.com/stat/site.com
That doesnt works. My rewrite rule in htaccess doesnt accept this. So it is must to use "/" after the site.


mysite.com/stat/site.com/
That works nice.

CasTex -7 Light Poster

Hello, I have a script that like;

<script language="JavaScript">
document.write('<input border=0 type=button value=\'\' ');
document.write(' onClick = "location.replace(');
document.write(' document.stats.site.value + \'/\');"');
document.write(' value="Search">');
document.write('</input>');
</script>

Works nice. It directs the user to the location that written in the text input. I mean user write a site and the script directs the user to mysite.com/stat/userwrittensite.com/

The problem is,

If the user do the same action after, it directs
to mysite.com/stat/userwrittensite.com/userwrittensite.com2/

How can I fix it ? Thanks...

CasTex -7 Light Poster

Hello,

function dwos($title,$body,$rpcurl,$username,$password,$categories=array(1))
{
$categories = implode(",", $categories);
function here.
}

My question is, how can I put value to categories ?

$category = "life, code, love"; // this not works ?

dwos($title,$body,$rpcurl,$username,$password,$[B]categories=array(1)[/B])
CasTex -7 Light Poster

Thats it :) Really thanks!...

CasTex -7 Light Poster

Nope :(

This is a bot that opens articles. It saves the content to database. I dont want to show (echo) anything in this scripts page. I open this php file, and It automatically write the article and saves to database.

Think the tables as a text. Like bla bla bla. I want to put these to the $uzuncuk. But what is the right way to make text and table together in $uzuncuk ??

CasTex -7 Light Poster

Yeah, I want to put that table to full_story. But I cant do it please help me...

CasTex -7 Light Poster

Thanks, It worked now, but It doesnt save this

<table cellpadding=0 cellspacing=0 border=0>
<tr cellpadding=0 cellspacing=0>
<td cellpadding=0 cellspacing=0>
<input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\">
</td><td cellpadding=0 cellspacing=0 class='srollover'>
<div style='padding-bottom: 1px; padding-left: 4px;'><? ".$cummle." - ".$size." ?> </div>
</td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'>
</td></tr></table>

to the full_story :(

CasTex -7 Light Poster

What I dont understand is, if I use this

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.";

It saves to database, but if I use this

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.

<table cellpadding=0 cellspacing=0 border=0><tr cellpadding=0 cellspacing=0><td cellpadding=0 cellspacing=0><input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\"></td><td cellpadding=0 cellspacing=0 class='srollover'><div style='padding-bottom: 1px; padding-left: 4px;'>".$cummle." - ".$size."</div></td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'></td></tr></table>";

It doesnt save. And what do you mean with this "check variable for $uzun while insert value " ?

CasTex -7 Light Poster

Ok...

<?PHP
ini_set('max_execution_time',0);

$sayfa=(int)$_GET['sayfa'];
if($sayfa){
$site = "http://www.xxx.com/download".$sayfa.".html";

$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$site);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$adres=curl_exec($ch);
curl_close($ch);

preg_match_all('#<TITLE>(.*?) download</TITLE>#si', $adres, $aldim);
preg_match_all('#/Download/(.*?)/4-#si', $adres, $aldim3);

if (empty($aldim[1][0])) {
die('<meta http-equiv="refresh" content="0;URL=?sayfa='.($sayfa+1).'">');
}

$srcrsm = "http://www.xxx.com/dlf_$sayfa.html";

$ch1=curl_init();
curl_setopt($ch1,CURLOPT_URL,$srcrsm);
curl_setopt($ch1,CURLOPT_RETURNTRANSFER,1);
$srcrsm=curl_exec($ch1);
curl_close($ch1);

$resim2 = $aldim[1][0];
$title1 = $aldim[2][0];
$site1 = $aldim[3][0];
$enson = $aldim[4][0];
$b1 = $aldim[5][0];
$b2 = $aldim[6][0];
$b3 = $aldim[7][0];

preg_match_all('#available.<br><br>(.*?)1</a><br><br>#si', $srcrsm, $aldim4);
preg_match_all('#<span class="style1">(.*?)<table cellspacing=0 cellpadding=0>#si', $adres, $aldim2);
preg_match_all('#<td><b>Publisher:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim5);
preg_match_all('#<td><b>License:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim6);
preg_match_all('#<td><b>Size:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim7);

$cummle = $aldim[1][0];
$publisher = $aldim5[1][0];
$license = $aldim6[1][0];
$size = $aldim7[1][0];

$pinti = array('<a href=','target=_new>Mirror #','"',' ','
');
$pinti1 = array('','','','','');
$pinti3 = str_replace($pinti,$pinti1,$aldim4[1][0]);

$ciktisi = strip_tags($aldim2[1][0]);
$category = "4";
$author = "harubo";


[B]$uzuncuk[/B] = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.<table cellpadding=0 cellspacing=0 border=0><tr cellpadding=0 cellspacing=0><td cellpadding=0 cellspacing=0><input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\"></td><td cellpadding=0 cellspacing=0 class='srollover'><div style='padding-bottom: 1px; padding-left: 4px;'>".$cummle." - ".$size."</div></td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'></td></tr></table>";


$zaman = date ("Y-m-d H:i:s");
$kisa = $kisacik;
$uzun = $uzuncuk;

$search = array('+','!','?','.',':');
$replace = array('','','','','');
$cumle1 = str_replace($search,$replace,$cummle); 

$asd = array('+','!','?',':',' ',',','&');
$fgh = array('','','','','-','-','-');
$nee = str_replace($asd,$fgh,$cummle); 

function kywrd($kelime) {
	
	$ayir  = explode(" ",$kelime);
	$count = count($ayir);
	for($i=0; $count>$i; $i++) {
		if($i>0) $sonuc .= ", ";
		$sonuc .= strtolower($ayir[$i]);
	}

	return $sonuc;
}
$btags = kywrd($cumle1);

		$tags = array();

		$btags = explode (",", $btags);

		foreach ($btags as $value) { …
CasTex -7 Light Poster

I am using it in here

mysql_query("INSERT INTO dle_post (title,date,short_story,full_story,category,tags,autor,approve,alt_name) values ('$cummle','$zaman','$kisa','[B]$uzuncuk[/B]','$category','$btags', '$author', '1', '$nee')");

$uzuncuk is the content that I put in the article. And the problem is, it doesnt save the $uzuncuk to database. The problem encourages from the content of $uzuncuk.

CasTex -7 Light Poster

Hello coders, I have a script that saves the values to database. I have this value

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.<table cellpadding=0 cellspacing=0 border=0><tr cellpadding=0 cellspacing=0><td cellpadding=0 cellspacing=0><input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\"></td><td cellpadding=0 cellspacing=0 class='srollover'><div style='padding-bottom: 1px; padding-left: 4px;'>".$cummle." - ".$size."</div></td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'></td></tr></table>";

But it doesnt save the value to my database. But if I make this;

$uzuncuk = "blabla";

It saves. And it means that the problem is in the value. In what way should I write that to save it to my database ?

CasTex -7 Light Poster

Really thanks, but now I get this error

Parse error: syntax error, unexpected T_DNUMBER at line 25 :(

My full code is this

<?php
/*
Script by CasTex
*/

// post tarihi
$issued=gmdate("Y-m-d\TH:i:s\Z", time());

// post title kısmı
$title="bakalim oliyir mii";

// postun body kısmı
$body="yaz buraya bişiler ne bilim ben.";

// blogid sini yaz
$blog_id="7421378769979406050";

// kullanici adi ve parola
$your_username="xxx";  //change this to your blogger login username
$your_password="xxx;  // change this to your blogger login password

$soru = "?";

// bloga yollanacak xml data
      $content = '<?xml version="1.0" encoding="utf-8" standalone="yes"?>';
      $content .= "<entry xmlns='http://purl.org/atom/ns#'>";
      $content .= "<title mode='escaped' type='text/plain'>".$title."</title>";
      $content .= "<issued>".$issued."</issued>";
      $content .= "<generator url='http://www.yoursitesurlhere.com'>client's name</generator>";
      $content .= "<content type='application/xhtml+xml'>";
      $content .= "<div xmlns='http://www.w3.org/1999/xhtml'>".$body."</div>";
      $content .= "</content>";
      $content .= "</entry>";

// bloga yollancak header
$headers  =  array( "Content-type: application/atom+xml" );

// Use curl to post to your blog.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.blogger.com/atom/".$blog_id);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_USERPWD, $your_username.':'.$your_password);
curl_setopt($ch, CURLOPT_POSTFIELDS, $content);

$data = curl_exec($ch);

if (curl_errno($ch)) {
 print curl_error($ch);
} else {
 curl_close($ch);
}

// sonucu bas
echo $data;

?>
CasTex -7 Light Poster

Ok, I use this;

$content = '<' . '?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?' . '>';
$content .= "<entry xmlns='http://purl.org/atom/ns#'>";
$content .= "<title mode='escaped' type='text/plain'>".$title."</title>";
$content .= "<issued>".$issued."</issued>";
$content .= "<generator url='http://www.yoursitesurlhere.com'>client's name</generator>";
$content .= "<content type='application/xhtml+xml'>";
$content .= "<div xmlns='http://www.w3.org/1999/xhtml'>".$body."</div>";
$content .= "</content>";
$content .= "</entry>";

But now it gives error at the first line of this code...

CasTex -7 Light Poster

I am getting error at the second line of the code, what is the problem :-/

$content = '<' . '?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?' . '>';
$content .= "<entry xmlns='http://purl.org/atom/ns#'>";
$content .= "<title mode='escaped' type='text/plain'>".$title."</title>";
$content .= "<issued>".$issued."</issued>"
$content .= "<generator url='http://www.yoursitesurlhere.com'>client's name</generator>";
$content .= "<content type='application/xhtml+xml'>";
$content .= "<div xmlns='http://www.w3.org/1999/xhtml'>".$body."</div>";
$content .= "</content>";
$content .= "</entry>";
CasTex -7 Light Poster

Hello, how can I do this ?

[IMG]http://img528.imageshack.us/img528/1996/ggg1mh2.jpg[/IMG]

The table is simple table, you can imagine that as a picture. But my point is, how to make the writing like that ?

CasTex -7 Light Poster

Hi everyone. Is there anybody who travelled to Bodrum ?
I am planning to travel to Bodrum. But dont know how is there.
I checked Travel to bodrum , and I decide to go there. What do you think ?

CasTex -7 Light Poster

Thanks a lot.
Can you please give me the full script ?

CasTex -7 Light Poster
$dosya = "index.php"; $fh = fopen($dosya, 'r'); 
$gercegi = "<[B]? [/B][B]include("sfpg.php"); sfpg(); echo $data;[/B] [B]?>[/B]";

if ($dosya != $gercegi)
{
echo "olmaz";
}

I want to do this but I cant. I do not want to run the bold text. I only want to use it in text.

How can I do it ??

CasTex -7 Light Poster

Hi everyone. I know how to make image in php, but I want to make url like this

http://my2.statcounter.com/project/standard/graph_summary_barchart.php?rand=193244925&PHPSESSID=1eb9e464667493b2a1a7038ce4b9f69c

Especially, the randed code.

For example, I have this script

uret.php

<form action="uret.php" method="post">
<input type="text" name="siteadi" value="http://" size="35" \>
<input type="submit" name="submit" value="Kodu Al">
</form>

<?
$web = $_REQUEST['siteadi'];
[B]$weble = md5($web);[/B]
if ($_POST["submit"] == "Kodu Al"){
echo $weble;
}
?>

And it encode the text to md5. Bu how can I make image url with the name of the md5 ??

CasTex -7 Light Poster

I tried it, but still it is a blank...

CasTex -7 Light Poster

Can someone tell me where is the problem ?

<script type="text/javascript" src="http://www.forumistan.net/analiz/analiz.php?site=http://www.forumistan.net"></script>

analiz.php

<?
Header("content-type: application/x-javascript");
ob_start();
include 'all.php';
ob_end_clean();
echo "document.write(\"<div class=\"txt\">Pagerank: $rank->pagerank <br>\")";
echo "document.write(\"Alexa: $rank->alexa_rank</div>\")";
?>
CasTex -7 Light Poster

Hi everyone,

I am successfully creating an image with php, but I want to make it hyperlinked. But I cant do it.

Here is my script:

http://www.forumistan.net/7tepe/olus.php?site=www.bodrumlife.com


PHP Code:

<?php  
header("Content-type: image/png");  
$yaziyaz = "Alexa: 3,493,231";  
$yaziyaz1 = "Pagerank: 3";  
$string = $yaziyaz;  
$string1 = $yaziyaz1;  
$im = imagecreatefrompng("resim.png");  
$orange = imagecolorallocate($im, 94, 94, 94);  
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;  
$px1 = (imagesx($im) - 11 * strlen($string1)) / 2;  
imagestring($im, 2, $px, 2, $string, $orange);  
imagestring($im, 2, $px1, 13, $string1, $orange);  
imagepng($im);  
imagedestroy($im);  
?>

--------------------------------------

I tried this but I got "headers already sent" errors.

<?php 
echo "<a href=http://www.forumistan.net>";
header("Content-type: image/png"); 
$yaziyaz = "Alexa: 3,493,231"; 
$yaziyaz1 = "Pagerank: 3"; 
$string = $yaziyaz; 
$string1 = $yaziyaz1; 
$im = imagecreatefrompng("resim.png"); 
$orange = imagecolorallocate($im, 94, 94, 94); 
$px = (imagesx($im) - 7.5 * strlen($string)) / 2; 
$px1 = (imagesx($im) - 11 * strlen($string1)) / 2; 
imagestring($im, 2, $px, 2, $string, $orange); 
imagestring($im, 2, $px1, 13, $string1, $orange); 
imagepng($im); 
imagedestroy($im); 
echo "</a>";
?>

___________

And I forgot to say that, I dont want to use html to hyperlink like this: <a href=#>http://www.forumistan.net/7tepe/olus.php?site=www.bodrumlife.com</a> I want to make it hyperlinked it in the php file...