hai
i have tried this one but still i am not getting any information..
The same info which i am getting using the curl_exec($ch);
there is no result getting displayed using the
echo $info['http_code'] . " " . $http_codes[$info['http_code']];
hai
i have tried this one but still i am not getting any information..
The same info which i am getting using the curl_exec($ch);
there is no result getting displayed using the
echo $info['http_code'] . " " . $http_codes[$info['http_code']];
Hai
i am using the curl option to validate the site for the rss feed.
my code is
<?php
// create a new cURL resource
$ch = curl_init();
$demo='http://chaitu09986025424.blog.co.in/feed/rss/';
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://validator.w3.org/feed/check.cgi?url=$demo");
curl_setopt($ch, CURLOPT_HEADER, false);
// grab URL and pass it to the browser
curl_exec($ch);
echo $info['http_code'] . " " . $http_codes[$info['http_code']];
// close cURL resource, and free up system resources
curl_close($ch);
?>
now the problem is that how do i read the file and pass the parameters...
the result of this would be
Congratulations!
This is a valid RSS feed.
Recommendations
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
•line 11, column 107: Self reference doesn't match document location [help]
... rel="self" type="application/rss+xml" /> ^Source: http://chaitu09986025424.blog.co.in/feed/rss/
1.<?xml version="1.0" encoding="UTF-8"?>
2.<rss version="2.0"
3.xmlns:content="http://purl.org/rss/1.0/modules/content/"
4.xmlns:wfw="http://wellformedweb.org/CommentAPI/"
5.xmlns:dc="http://purl.org/dc/elements/1.1/"
6.xmlns:atom="http://www.w3.org/2005/Atom"
7.>
8.
9.<channel>
10.<title>Chaitu's</title>
11.<atom:link href="http://chaitu09986025424.blog.co.in/wp-rss2.php" rel="self" type="application/rss+xml" />
12.<link>http://chaitu09986025424.blog.co.in</link>
13.<description>Know about the World and gain some Knowledge</description>
14.<pubDate>Fri, 20 Nov 2009 11:18:56 +0000</pubDate>
how do i pass the This is a valid RSS feed. data in code so that i can validate the given url..
please some body help me on this..
i dont have curl installed in my php..Is there any way to do it without using curl.
Hai
i am building a site for validation of the RSS feeds and adding it in the database.
When a user enters a rss web address i need to validate the address and if it contains a rss then i need to enter it into the site or else i need to mention a message..
how do i do it.
i think the easy way is to pass the feed address to this address http://validator.w3.org/feed/check.cgi?url=
but how can i check what result is it giving..
do any one have an idea or else if u have any validation things available. kindly help me out..
<html>
<body>
<form action="subscription.php" method="post">
<b>Add New Subscription URL :</b><input name="subscr" value="" size="50">
<input type="submit" name="submit" value="Add" />
</form>
</body>
</html>
<?php
//include("login.php");
include("access.php");
mysql_select_db($dbname);
if (isset($_COOKIE['user']))
{
echo "Welcome $_COOKIE[user]<br>";
$username="$_COOKIE[user]";
//echo "<p>$username</p>";
$query = mysql_query("SELECT email,password FROM userlogin WHERE username = '$username'") or die(mysql_error());
$data = mysql_result($query,0);
//echo $data;
}
else
{
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=login.php\">";
}
$subscr=$_REQUEST['subscr'];
if($subscr)
{
//url validation
if (preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $subscr))
{
//print "$subscr url OK.";
mysql_select_db($dbname);
$re=mysql_query("select * from usubs where url='$subscr'");
$rows=mysql_num_rows($re);
if($rows==0)
{
mysql_query("Insert into usubs(email,url) values('$data','$subscr')");
//echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=all.html\">";
}
else
{
echo "The $subscr url already exists with your login";
//echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=subscription.php\">";
}
}
else
{
print "$subscr url not valid!";
}
}
else
{
//echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=subscription.php\">";
//echo("$subscr");
}
?>
this is my code
presently i am …
hai
silly me:$ i have done the wrong in the html files
it is displaying this error from that files..
Thank you for your help pal...
Thank you so much pal...
The issue is now resolved.....:icon_razz:
but the only thing is that it is displaying the path as http://localhost/
when i am checking in my machine..
how do i change it to my machine ip
an if i changed it to my ip address it dispalying a big error.
Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\Program Files\xampp\htdocs\chaitu\magpierss\re.php on line 17
Warning: include(http://192.168.0.35/chaitu/magpierss/clock/clock9.html) [function.include]: failed to open stream: no suitable wrapper could be found in C:\Program Files\xampp\htdocs\chaitu\magpierss\re.php on line 17
Warning: include() [function.include]: Failed opening 'http://192.168.0.35/chaitu/magpierss/clock/clock9.html' for inclusion (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\chaitu\magpierss\re.php on line 17
dir is chaned to
$dir = "http://192.168.0.35/chaitu/magpierss/clock/";
its right, line17 should have been like this -
include("$dir".clock."$arr_file_names[$rnumb]");
Thank you so much pal...
The issue is now resolved.....:icon_razz:
That means you want to include the file randomly in the page (yes, its called 'include'), so need to use the anchor tags
replace the line10 in above code with the below one -include(".$dir."clock".$arr_file_names[$rnumb].");
hai
it is displaying this error
Parse error: parse error, unexpected T_STRING in C:\Program Files\xampp\htdocs\chaitu\magpierss\re.php on line 17
<?php
$dir = "./clock/";
$arr_file_names = array(1=>'1.html','2.html','3.html','4.html','5.html','6.html','7.html','8.html','9.html','10.html');
$number_of_html_files = count($arr_file_names);
$rnumb = ceil(rand(1,$number_of_html_files));
// test the file name with its file path here -
//echo $dir."clock".$arr_file_names[$rnumb];
include("$dir."clock".$arr_file_names[$rnumb]");
echo "<a href=".$dir."clock".$arr_file_names[$rnumb].">$arr_file_names[$rnumb]</a>";
?>
I have modified your code -
//by speifying this and using in the echo below, all the files in the array should be from this directory only $dir = "./clock/"; $arr_file_names = array(1=>'my_string.html','my_script.html','new_counntry.html','test.php','test1.php','test2.php','etst2.php','something.php','ejej.php','bored.php'); $number_of_html_files = count($arr_file_names); $rnumb = ceil(rand(1,$number_of_html_files)); // test the file name with its file path here - //echo $dir."clock".$arr_file_names[$rnumb]; echo "<a href=".$dir."clock".$arr_file_names[$rnumb]."></a>"; ?>
hai pal
this is not displaying any thing..
i have the code changed to this one..
then it is just showing me the link. where as i require the code to display the html file directly
<?php
$dir = "./clock/";
$arr_file_names = array(1=>'clock1.html','clock2.html','clock3.html','clock4.html','clock5.html','clock6.html','clock7.html','clock8.html','clock9.html','clock10.html');
$number_of_html_files = count($arr_file_names);
$rnumb = ceil(rand(1,$number_of_html_files));
// test the file name with its file path here -
//echo $dir."clock".$arr_file_names[$rnumb];
echo "<a href=".$dir."clock".$arr_file_names[$rnumb].">$arr_file_names[$rnumb]</a>";
?>
Hai
I have some html files and i would like to display them in a random manner using the php.
can any one help me out..I have been trying this one..
but it is not working..
<?php
$dir="./clock/";
$nimg="10";
$itype="html";
$rnumb=rand(1,$nimg);
echo "<a href=".$dir."clock".$rnumb.".".$itype."></a>";
?>
Thank you for your reply i resolved it out
<?php
include("access.php");
mysql_select_db($dbname);
$user="ym_chaitu";
//$e=mysql_query("select email from userlogin where username='$user'");
//$email=mysql_query($e,0);
$query = mysql_query("SELECT username,password FROM userlogin WHERE username = '$user'") or die(mysql_error());
$data = mysql_result($query);
echo $data;
?>
this is my code,,when i am using it out, it is giving me an error
Warning: Wrong parameter count for mysql_result() in C:\Program Files\xampp\htdocs\chaitu\magpierss\test.php on line 8
can any one let me know where an i wrong
check this out
<?php
$subscr=$_REQUEST['subscr'];
//url validation
if (preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $subscr))
{
print "$subscr url OK.";
} else {
print "$subscr url not valid!";
}
//echo("$subscr");
?>
Hi
Actually what u have done must work, But i cannot exactly tell what is that had happened in ur case. So try using the filezilla server on 2003 machine and using client upload the files on to the server.
I'd say that wasn't the brightest place to hid files :) :)
Hi Try this one to create a folder which u can see that but when u double click on it, it will open some other file/ folder in system instead of showing the contents in the folder. where as u can open the fodler by using the command prompt
Following is a method by which u can convert any folder into either Control Panel, Recycle Bin, My Computer or Internet Explorer.
This is done by adding their respective registry keys to the folder’s name. After this when you’ll double click on the folder, either Control Panel, Recycle Bin, My Computer or Internet Explorer will open according to your choice. Actually that folder is then treated by Windows as a link to any of these four. The folder will remain intact with all its data and no one can access that folder via Windows. It can only be accessed via Command Prompt or some third party app.
To Convert Folder Into Contol Panel, Rename With Adding
.{21EC2020-3AEA-1069-A2DD-08002B30309D}
To Convert Folder Into Recycle Bin, Rename With Adding
.{645FF040-5081-101B-9F08-00AA002F954E}
To Convert Folder Into My Computer, Rename With Adding
.{20D04FE0-3AEA-1069-A2D8-08002B30309D}
To Convert Folder Into Internet Explorer, Rename With Adding
.{871C5380-42A0-1069-A2EA-08002B30309D}
example==If you have a folder ABC, to convert it into Control Panel, rename the folder as
ABC.{21EC2020-3AEA-1069-A2DD-08002B30309D}
IF YOU WANT TO RE-ENABLE YOUR FOLDER TO BE ACCESSIBLE VIA WINDOWS …
two probs with this one:
- Have heard of this from time to time... but no-one ever say how you actually access said folder (as presumably Windows explorer won't show it, as is "super hidden", and with no name, can't open using the Run console!
- That method won't work in Win7 (nor Vista from memory) as that method of ASCI-character input is no longer supported. You'd need to use Character Map to select and copy a blank character space instead.
Of course using TrueCrypt to create a folder with a hidden inner volume works a charm as well as above techniques... TC even allows the installation of an entirely hidden OS ;)
NB: Just playing with said method, can set as hidden folder, but with hidden files visible, still get an unusual entry listing in Windows Explorer when in list or details view which would be sure to raise the curiosity of anyone... make it more of a target not less.
Hai pal
I have mentioned this one just for an purpose that u can do that without using any third party applications...
and one more thing if u want to use any other applications then try using the PCSECURITY which would work more efficiently without anyone having the fear of getting it uninstalled ,where as truecrypt can be uninstalled by any administrator or a power user.
After this all the data stored in the hidden folders is gone for nothing...:(
And for the thing os …
I am also facing the same issue. But could not able to find any absolute solution but i have found one thing if i use the vlc media player and windows media player then this problem occurs..
For Hidden folder this is the trick
Right Click under any drive and create a new folder.
Now press F2 to rename the folder and type the following alt+0160
this would make you a folder with no name at all.
Now right click and navigate to properties and to the customize tab and there under Folder Icons click on Change Icon and select an icon which is blank one and click on apply and ok
There u go ur secret hidden folder is there ready.
Note: When u put the Thumbnail view and the List view a Blank thing will appear. so not for this one.