Find Jobs
Hire Freelancers

PHP program to remove a block of code from html files

$10-30 USD

Terminado
Publicado hace más de 2 años

$10-30 USD

Pagado a la entrega
We need to remove blocks of lines of code from thousands of html files using a string match and ending with a specific tag, and then insert a removal tag. The search string will be id="123" in the line <div class="list-group-item" id="123">. This is the start of the block. The end tag is comprised of two lines, </div>#13#10</div>, where the #13#10 are carriage return and line feed. Then we insert the removal tag as an HTML comment. <!-- Removal ID:A237 --> There are thousands of html files and every file will have a different search string, but all blocks will end with the same end tag. We read the search strings from another text file where each line has a search string, a file name, and a removal ID. We use the search string to search in the file name. 123:[login to view URL]::A237 4567:[login to view URL]::X789 890:[login to view URL]::J234785 Here is an example of how the php code may look: <?php $f1 = fopen('[login to view URL]','r'); while ($line1 = fgets($f1)) { $search_string = substr($line1,0,strpos($line1,':')); // 123 $search_file = substr($line1,strpos($line1,':'),...); // [login to view URL] $removal_id = substr($line1,strpos($line1,'::'),...); // A237 $f2 = fopen($search_file,'r'); while ($line2 = fgets($f2)) { if strpos($line2,'id='.$search_string)>0 { remove lines until you find 2 lines, </div>#13#10</div>, and also remove these 2 lines insert removal tag write the changes to the file } } fclose($f2); } fclose($f1); ?> EXAMPLE: BEFORE CHANGE ([login to view URL]) <!DOCTYPE HTML> <html lang="en"> <head><title>Title</title></head> <body> <div class="container"> <div class="list-group"> <div class="list-group-item" id="8249082704"> <div class="111">Hello</div> </div> <div class="list-group-item" id="123"> <div class="111">Hello</div> </div> <div class="list-group-item" id="2478569785"> <div class="111">Hello</div> </div> </div> </div> </body> </html> AFTER CHANGE ([login to view URL]) <!DOCTYPE HTML> <html lang="en"> <head><title>Title</title></head> <body> <div class="container"> <div class="list-group"> <div class="list-group-item" id="8249082704"> <div class="111">Hello</div> </div> <!-- REMOVAL ID:A237 --> <div class="list-group-item" id="2478569785"> <div class="111">Hello</div> </div> </div> </div> </body> </html>
ID del proyecto: 32739681

Información sobre el proyecto

26 propuestas
Proyecto remoto
Activo hace 2 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hi, there. I read your project description completely, and I found my skills relevant to your project. I have reviewed your job post carefully and I hope I'll get this chance to prove my skills and capabilities. I am interested in this task and like to work on this task. I’d like to have an initial discussion over chat. I hope starting this project with you! Thank you.
$15 USD en 4 días
5,0 (1 comentario)
1,4
1,4
26 freelancers están ofertando un promedio de $34 USD por este trabajo
Avatar del usuario
Hello right now I can help you with the php code. I read through the job details extremely carefully and I am confident I can exceed your expectations. I have long experience with right skills to work on this project. I want to show you my completed projects so please visit on my profile for portfolio and experiences.
$30 USD en 1 día
4,9 (426 comentarios)
7,8
7,8
Avatar del usuario
Hello, i can help you this project, please send all HTML file to me, then i will help you change and send again to you, i will complete fast, kind regards.
$30 USD en 1 día
4,9 (461 comentarios)
7,8
7,8
Avatar del usuario
Hi, I can remove a block of code from html files right now.... I am available to start the work ASAP. Thanks Mananbir
$25 USD en 1 día
5,0 (114 comentarios)
6,9
6,9
Avatar del usuario
Hi, This is Muhammad Zahid I went through the details of your project and would like to offer our services to deliver the results that you expect and we are sure you will not be disappointed. Our team is experienced, creative & efficient enough to get your job done well. We have an impeccable record and all our clients enjoy working with us, we are sure that you will too. We have expertise in PHP, Laravel, CI, Cake PHP, ZEND, JavaScript, Node, React, Angular, Next, Bootstrap, jQuery, HTML, CSS. Mobile: Android, IOS, REST API Databases: MySQL NoSQL Mongo CMSs: WordPress, OpenCart, Shopify, Magento, Joomla, Drupal, PrestaShop
$20 USD en 7 días
4,8 (63 comentarios)
7,2
7,2
Avatar del usuario
I'm an experienced Web Developer working since 2007 as a PHP & MySQL coder. I can surely help you on your project and have it done in a timely manner, with the best prices and high quality work. I can use regular expressions for this. Please send me a private message, so we can discuss this project in details and I can make a proper bid. Sorry, but this will not be an easy task to do, that's why my bid price is above your budget, but that's the most fair price I can do. Hope you understand. But I will do that task for sure, I will not waste your time. Best Regards.
$99 USD en 3 días
4,9 (152 comentarios)
6,8
6,8
Avatar del usuario
Hi, there. As an experienced Web developer, I can finish your project in short period of time. The skill-set you specified matches my major ability. I wanna know the project requirement in more detail via chat. I am waiting for your reply. Thank you.
$50 USD en 1 día
4,9 (18 comentarios)
5,3
5,3
Avatar del usuario
Good day, hope you're having a great day! I have noticed you are looking for a PHP developer to write a script for you to remove specific block of HTML code from bunch of files. I have 3+ years of experience of working with PHP language as I am a laravel developer. I have a solution in my mind to make the solution more optimised aur easier for you to run on multiple fills. We can traverse all files at the same time. Please come in chat for a detailed discussion. Thanks!
$25 USD en 7 días
5,0 (19 comentarios)
5,0
5,0
Avatar del usuario
Hello there! I think my expertise with regular expressions and PHP will help you get your job done quickly. I have read your project description and am excited to work on this. We can discuss the details in chat. I am a full-stack developer with more than six years of experience building high-quality web-apps. During my career I came across many non-trivial challenges and overcoming them helped improve my skills massively. You should consider hiring me because: - I am a professional Freelancer. I strive to improve client experience with excellent work. - I report work progress daily, weekly, or monthly as per client's wishes (this also depends on the scale of the project itself). - I am available to guide you at any step. If I know a better solution to something then I will let you know. Deciding whether to go with it or not is completely your choice, of course. - I work hard to deliver the product before the set deadline. Time is important to both of us. I can guarantee you some high-quality work; hiring me will not be a waste of your time. Let me know if you think I am a good fit for this project. I am available for a chat right now and if we negotiate a deal, I can start work immediately. Thank you for considering me. Have a nice day :)
$20 USD en 7 días
5,0 (6 comentarios)
3,7
3,7
Avatar del usuario
I am a website developer with more than 3years of experience. Contact me for further deliberations...................... Regards, Ginu
$20 USD en 7 días
4,9 (13 comentarios)
3,9
3,9
Avatar del usuario
Hello sir i have more than 6 years of experience as a full stack web developer and i can start working on your project immediately
$30 USD en 1 día
5,0 (7 comentarios)
2,0
2,0
Avatar del usuario
Nice to meet you, my client. I have carefully read your job post and i can do it perfectly for you. If you need my help, please contact me. Best regards.
$20 USD en 1 día
5,0 (1 comentario)
0,6
0,6
Avatar del usuario
Dear Sir! Nice to meet you and your project. Thanks for posting. My pleasure to submit the proposal for your project. I have read your project's detail and I'm sure to finish your project perfectly. Looking forward to positive response. Let me go on, you will get the best project that you can ever get. Thank you very much to see my proposal. Best Regards/
$20 USD en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de CANADA
Montreal, Canada
5,0
44
Forma de pago verificada
Miembro desde oct 23, 2008

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.