|
Thanks for your reply, I'll tell to our admin about this.
thanks again,
jyn
|
|
|
|
|
I use this but it is not working
";
echo "Compressed Size: " . zip_entry_compresedsize($zipFile) . " ";
echo "Real Size: " . zip_entry_filesize($zilFile) . " ";
}
?>
do you have any idea how to read this zip file ?
|
|
|
|
|
I hope you didn't paste that in, because it looks like there's a mistake on almost every line.
I believe the main problem is trying to read the zip file directly from the remote address. Try taking a copy of the file, and open that instead:
$file = "http://www.nseindia.com/content/historical/EQUITIES/2010/APR/cm12APR2010bhav.csv.zip";
$tmp_file = "tmp/tmp.zip";
copy($file, $tmp_file);
$zip = zip_open($tmp_file);
while($zipFile = zip_read($zip))
{
...
You should check that zip_open returns a resource before trying to read from it too - use is_resource on the result.
|
|
|
|
|
Thank you very much for your help code is working.
|
|
|
|
|
Hi ALL,
Sorry to bothered but i hope you could spend some time to help me out. I'm new to PERL and CGI and im currently dealing with products related to wireless sensor network.
They consists of tiny motes and sensorboards where the mote collect information of heat,light and sound and they transfer the information to the sensorboard connected to the computer and uploads data to the computer.
Whereby im able to view data collected in web page when i turn on the web interface. The web page consist of a html header where they load the data collected in the frameset which is in .cgi format.
The problem is that the data receive does not over write. which means that it just keep on going on till the page is full and a manual scrolling and refreshing of the page is need.
My question is that:
1: Is it possible to input a timer or a counter in the .CGI file which enable it to refresh on its own?
2: The data keeps going on without over writing. Is it possible to make the data overwrite?
3: Can i input images into the .CGI file?
Thanks you for your time and hope to hear from you soon!
Thanks & Regards
Joseph
|
|
|
|
|
i have my C++ code that i developed in Visual Studio 2008
the solution contains 4 projects
i want that code to be ported to GCC and i have no clue how to do it. i think it is done using a makefile but still if u ppl can help me
|
|
|
|
|
Yes. It is done through a makefile. I'd suggest you to take a look at CMake which can automate the overhead of generating a makefile. If your application is simple enough, you can write your own makefile.
Best wishes,
Navaneeth
|
|
|
|
|
Experts,
I have a table in php which displays all serial numbers in the program. What i would like to do is when the user for example wants to find serial number ABCDEF123 they will type it in the text box and then press submit. I would then like all the other serial numbers to dissapear/hide and then just show tht serial number.
I have created the text box and button in php but dont know how to do the above.
If anybody could help that would be great
Many thanks
Dan
|
|
|
|
|
the simple way would be to make a form and have the page post to itself. At the top of the page in php
<?php ... ?>
check to see if the field has been submitted using isset() and if so run a sql query and output the info below the form in a table.
Be extra careful with checking the input value before you run it in a query. I run a scrubber function that only permits valid characters to be used. Also read up on mysql_escape_string(), add_slashes() and related function and the user comments. A lot of good info in there.
|
|
|
|
|
The W3Schools have a page explaining how[^] to filter the data from a database using PHP, might be a good starting point
I are Troll
|
|
|
|
|
 I note that you'd like the other numbers to disappear/hide - implying that they're already visible on the page. If that's the case, then why use php for that I wonder? Surely the approach to use is one of JavaScript?
I'd achieve what I understand as the aim with code resembling the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.style1 {
font-size: 24px;
font-weight: bold;
}
.hiddenTxt {
display: none;
}
</style>
<script type="text/javascript">
function byId(e){return document.getElementById(e)}
function doFind()
{
var table = byId("table1");
var row , x, y
var searchStr
searchStr = byId("serialInput").value
for (y=0; y<5; y++)
{
row = table.rows[y]
for (x=0; x<5; x++)
{
if (row.cells[x].innerHTML != searchStr)
row.cells[x].className = "hiddenTxt"
else
row.cells[x].className = ""
}
}
}
function doReset()
{
var table = byId("table1"), row , cell, x, y
for (y=0; y<5; y++)
{
row = table.rows[y]
for (x=0; x<5; x++)
{
cell = row.cells[x]
cell.className = ""
}
}
}
</script>
</head>
<body>
<table width="300" border="2" bordercolor="#333333" id="table1">
<caption>
<span class="style1">Serial Numbers</span>
</caption>
<tr>
<td>1234</td>
<td>5678</td>
<td>9012</td>
<td>3456</td>
<td>8901</td>
</tr>
<tr>
<td>abcd</td>
<td>efgh</td>
<td>ijkl</td>
<td>mnop</td>
<td>qrst</td>
</tr>
<tr>
<td>uvwx</td>
<td>yz</td>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
<tr>
<td>d</td>
<td>e</td>
<td>f</td>
<td>g</td>
<td>h</td>
</tr>
<tr>
<td>i</td>
<td>j</td>
<td>k</td>
<td>l</td>
<td>m</td>
</tr>
</table>
<p>Search for
<input type="text" id="serialInput" size="20" maxlength="4" value="1234"/>
<input type="button" id="findBtn" value="Find" onclick="doFind()"/>
<input type="button" id="findBtn2" value="Reset" onclick="doReset()"/>
</p>
</body>
</html>
|
|
|
|
|
hi everyone
i want to make a simple web crawler in ubuntu,
can anyone tell me how to start with and further,thanks in advance
|
|
|
|
|
Install wget[^] a command line tool. Or use the programming language of your choice, Python/Perl/C++/etc should offer HTTP libraries you can use. Or butterflies.
Hope it helps!
/M
|
|
|
|
|
How to copy web page using php? I tried this
But it is not working. Any Idea how to do this ?
|
|
|
|
|
It works for me. Check that the allow_url_fopen option is enabled and that you have permission to write to the output file. Manual page.[^]
It's also possible that the server you're running it on is firewalled to prevent it accessing the remote address, so I would check that you can get to it from the server using something like lynx.
|
|
|
|
|
Thanks for your help. it is working code but I am trying to copy all data. Open this link "http://nseindia.com/marketinfo/companyinfo/companysearch.jsp?cons=mll§ion=7" in your browser and then match the data with example.txt after that you can understand what i want to say.My question is how can i copy all data using php ? Thanks in advance.
|
|
|
|
|
I get exactly the same content if I save out the page as when I run the PHP script - a page with empty tables.
I see what the problem is though - the data is loaded using Javascript, so isn't present in the page at all. If all you want is the data, I'd recommend finding out how it gets pulled onto the browser and reading that instead.
|
|
|
|
|
Thanks for your help brother. I think i can't write code because i don't know programing very well.Do you know some one who can write this code for me and how much it will cost me ? Thanks in advance.
|
|
|
|
|
Ive been trying to send and receive emails for a gmail account and Im thinking I should just restart from scratch. Ive tried getting the url of each individual email by requesting Gmails atom feed (https://mail.google.com/mail/feed/atom[^])
but when I navigate to their url it just sends me to a login page. Does anyone know if you even can receive emails via the atom feed, or know of a gmail API? Or a better method than the atom feed?
|
|
|
|
|
|
|
I am brand new to PHP and i am trying to figure out how to get it to find all its dll. I have tired to modify the ini file telling it were to find the dll with the extension_dir command but still nothing.
When i went to uninstall and reinstall i came accross bigger problems with the dll, the code wouldnt compile.
All i am trying to do is set it up to connect to mySQL on my machine as well as DBase.
If anyone could give me any kind of information or maybe places were i could go look to find stuff out that would be much appreciated.
|
|
|
|
|
Better use XAMPP bundle which has php, mysql, apache and perl. Every will be ready in just on click install.
the document root will be htdocs inside xampp which will be the root folder of this install.
then open xamppcontrol.exe. start apache and mysql. open the browser. type http://localhost and select english. click phpmyadmin to create databases and tables. you can enable disable options in php.ini which will be present in the apache folder. and ... enjoy...
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
|
what OS are you using?
There are a number of predefined builds that can save you the trouble of compiling it.
|
|
|
|